Dynamic PDF output name [message #1745059] |
Tue, 04 October 2016 16:37 |
Manuel Schlieter Messages: 1 Registered: October 2016 |
Junior Member |
|
|
Hello together,
I am pretty tilted right now since I can't get things to work.
I'm using the Eclipse Birt Designer for my reports, and i'm trying to make use of the IFilenameGenerator interface, but eclipse refuses to use it.
I set the "BIRT_FILENAME_GENERATOR_CLASS" parameter in every.xml file i have found in the directory "eclipseBirtDesigner\plugins\org.eclipse.birt.report.viewer_4.5.0.v201506092134\birt\WEB-INF".
I implemented the class, exported it as a jar. I went to "Preferences>Report Design>Classpath" and added the jar-File.
When i run the report in the browser and export to PDF -> it's the Reportnname. Running directly "as PDF" has the same result. No errors, nothing in the logfile. No console output.
Things that work:
Using the exact same jar on an actual tomcat with birtviewer service. Added the lib, changed the web.xml, works like a charm. But that's no development environment so it's no solution.
Things that dont't work:
Running reports from Eclipse Birt Designer with custom FilenameGenerator.
Things i need to know:
Is it possible and how to add ReportParameters into the custom FilenameGenerator? I think the options parameter could come in handy. Can I achive this from scripting to some event? As report parameter i ask for a date, and this date should appear in the filename.
I at least tried to following script in afterRender-Event:
reportContext.getRenderOption().outputFileName = "foo.bar";
Nothing. I also found the PDFRenderOptions, at least it has an outputFileName property. But I have no idea how to instantiate it or add it to the reportContext.
I hope someone can help me.
Thanks in advance and best regards!
[Updated on: Wed, 05 October 2016 07:21] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02812 seconds