Is this possible to launch multiple Birt report generation by script ?
Well, pre-defined reports or your custom one? If the later, where are they stored?
In theory that should be somehow possible I see difficulties in all these options the report wizard offers.
For m2doc we have added this feature right from the beginning. For BIRT we missed it in the past
Jan
custome one. The idea would be to have a script with all the necessary parameters to launch each one (e.g. name, path, options...)
I have lot of html document to generate regularly and it takes lot of time...
Romain,
okay, got it. Where do you maintain the templates, in the project config folder or outside of the project?
in the project config folder
Hi Romain,
I managed to prepare a very first simply library that can generate a report in a script. I have attached as usualy the library (I named it reports.js) and a test file to show its usage. Please give it a try. Most parameters are currently hard coded in the library, only the format can be passed as parameter. You need the abolsut path t the design file, so maybe you try first with something outside your project.
Any feedback is appreciated!
Regards
I forgot to mention that I created and tested this with 2023 R1.
I am very dorry for my late reply Jan...and thank you for your script.
Unfortunatly, it does not work. I have an error at the row: "runnable.run(progressMonitor);"
First of all i am currently using the 2022R2 package. Projects migration will come in few weeks. Is that the reason ?
Then other questions:
dp.setSelection(selection);
dp.setOverrideReportLayoutSettings(false);
dp.setEmbedImages(true);
dp.setImageFolder(MediniFileUtil.createTempDir("ReportGenerator", ".tmp", null).getAbsolutePath());
thanks for testing. The dialog says "syntax error" so I doubt it has something to do with the version, though I will try myself wth 2022 later,
.I am traveling so it may take soem time.
You analysis of all options is correct. setEmbedImages is an old option you cant change at UI but it is still there. So the script should better set it.
The report runnable needs a temporary folder to generate images before the actual BIRT engine takes them so that's the last setting.
Romain, it was working in my 23.1 env so I wonder why a syntax error may come in your place, maybe you switched STRICT mode on and I did not?
Could you check?