Switch Library in Report via Script #2442
Replies: 1 comment 3 replies
|
Depending on how you integrate BIRT reports into your application, the following approach may work (I did exactly this for our own application): There is a At runtime, even before BIRT is invoked, a little Python script runs.
... and the same for the *.js files. The script works similar to For the *.js files, it's easier; just copy the file. I don't think it is possible to achieve something like this with BIRT only. But if anyone comes up with a working idea, please post it here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In my application I have a set of default reports that shall work with a library.
My goal is to enable my customer, to copy the library to a configuration folder and change it, so his changes are not overwritten by updates of my default library.
In my dream scenario, I would add a script to my report, that checks if the custom library exists and if yes, replaces the default library with the custom library. I tried different things in the beforeFactory and initialize Methods of the report. I got so far, that I changed the fileName of the library in the corresponding design handle, but that didn't change anything in the output (manually changing the filename in the report XML works, so switching the library could do the trick).
After my research it seems, that BIRT has already read and cached the original library and therefore doesn't read the library after my changed again - even when I do somethin like designHandle.reloadLibraries()
Something small I tried in onRender of the report, but had many different ideas on doing the trick (AI was kida helpful to get new ideas, but none worked):
Does anyone do something similar already? Is it possible?
p. s.: I want to change the library, so my customer can copy the original one, make changes to fonts and colors and keep his changes on updates of my original library (that has to be overwritten in Updates of my application, so the customer gets the changes I make for the default reports). Therefore, is adding a new Theme to the existing library not a feasible solution, I think.
All reactions