Jump to content

BIRT Developer Center Download


Photo
- - - - -

Need to modify an rptDesign file before execution


  • Please log in to reply
3 replies to this topic

#1 spongebob

spongebob

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 February 2012 - 08:54 AM

Hi, I'm using Actuate Java Components, specifically the Actuate Deployment Kit war file to run reports. I've customized the web.xml of the war to specify a STANDALONE_REPOSITORY_PATH and the webapp is picking up the files from the directory specified in the configured location. Now I'd like to change the query in the canned .rptdesign file BEFORE the report is run. I *think* I'll be able to find the java API to manipulate the report before it is run. The question I have even before I do that is, how can I find the point in the code of the webapp where the report is launched from, so that I can intercept the call and change the query. I was hoping that I will be able to drop a customized jar in WEB-INF/lib that will have my code to do this. Is this the correct approach? Is there some documentation that talks about this kind of integration? Thanks!

#2 averma

averma

    Senior Member

  • Members
  • 713 posts

Posted 14 February 2012 - 09:47 AM

Hi spongebob, You can use scripting to dynamically change the query in the report without modifying the report design file, here is an example: http://www.birt-exch...y-modification/ Ashwini

Ashwini

Follow me on Twitter
Read my Blog BIRT Rocks!


#3 spongebob

spongebob

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 February 2012 - 10:53 AM

Hi Ashwini,
Thanks for the pointer.
But I was (and I should have mentioned this in my post) looking for a Java solution.
Is there anyway I can get the canned.rptdesign file, manipulate it using the *java* api, save it to the same repository location and then let the war launch it as it was going to before interception?

Thanks!


Hi spongebob,
You can use scripting to dynamically change the query in the report without modifying the report design file, here is an example:
http://www.birt-exch...y-modification/

Ashwini



#4 averma

averma

    Senior Member

  • Members
  • 713 posts

Posted 15 February 2012 - 03:57 PM

Hi spongebob, You could use BIRT design engine API for modifying a design file dynamically. Here is the link to some more details and examples: http://www.eclipse.o...gnEngineAPI.php Here is link to some a developer guide if you wish to integrate the above into report execution aspects: http://www.birt-exch...opers-guide.pdf

Ashwini

Follow me on Twitter
Read my Blog BIRT Rocks!