Community
Participate
Working Groups
Created attachment 79158 [details] The report Build ID: I20070625-1500 Steps To Reproduce: 1. Take the report and the library in attachement The library contains two themes with the same style (red and aqua). The report contains a parameter used to change the theme of the report at runtime (initialize script method on the report) 2. Running the report in preview mode in eclipse, change the parameter value, the script "initialize" works succesfully 3. Do the same thing in the Web Viewer, does not work. It works the first time because the default theme of the report is aqua, and the default value of the parameter is red which is successfully applied More information: -> After a little debug mode, it seems that the name is not resolved.
Created attachment 79159 [details] The library
I try also, using the setThemeName method. This method throw an exception.
It doesn't work even in 2.2.1 ... I really need someone to check why it does not works (it works in 2.1.1) and how I can correct this in 2.2.0.
Move it to report engine to wake up someone.
So thakns to Jason in the newsgroup I have a workaround. In the plugin org.eclipse.birt.report.viewer : - Modify in BirtParameterDialog.js line 839 : else if ( true ) //this.__ifSubmit( this.__mode, action ) ) - in the web.xml param_name BIRT_OVERWRITE_DOCUMENT to true. I hope that someone can read it before the 3.0 to correct this bug. It's not a normal situation to modify source code of a software just after the download to make it works like the previous version ...
In 2.2.1 this workaround doesn't seem to work, neither in preview mode nor in the web viewer. I can see from the timestamp that the document file is regenerated. It must be another bug from the engine part.
Works for me in 2.2.1 in preview and in web viewer. Correction for 2.2.1 in BirtParameterDialog is at line 922. The fact that the timestamp of the rptdocument, doesn't mean anything. I suggest you to read the thread and Jason's explanations. The rptdocument has to be full overwritted to make it works ... Which is not a very good solution ... This is only a workaround, I want someone to tell me why it was working in 2.1 and not now. Perhaps it's from the engine but I don't think so, because the preview works each time and the web viewer works at the first launch also. So it's really during the regeneration of the rptdocument. The preview works because it always rewrittes the rptdocument.
The preview mode and web viewer are different. The preview doesn't generate document file and web viewer will generate document file first and then render it. The workaround is to force overwrite document file each time and it isnot a good solution. Reassign to engine team to do further research.
Model does not store all information of theme in document. so currently model can support this case. Reassign to Model team to do further research.
It is not very possible to save theme in document because only library can contain theme, report design schema does not contain any theme. We need further investment to see if we do need to support this user case.
It is a known issue since in web viewer mode, a serialized design is used, which has no theme information.
Is the enh request to Render the same report document under different theme? Or Is the enh to RUN the same report design under different theme? If the feature is to RENDER the same report document under different theme, can we use the new feature of referencing an external CSS file? Can the report design have a script to reference different CSS file based on report parameter values?
Can we consider adding external CSS file handler to allow changing the CSS file per web app context (such as per user)?
Is this bug simply because user need to put an __overwrite=true in the URL request? Because the report document was cached hance changing the theme in script would not trigger the refresh of the doc? This is the reason it works in preview but not in the viewer after the first time?
(In reply to comment #14) > Is this bug simply because user need to put an __overwrite=true in the URL > request? > Because the report document was cached hance changing the theme in script would > not trigger the refresh of the doc? > This is the reason it works in preview but not in the viewer after the first > time? Schedule to 2.5.0 to consider adding CSS reference handler. The handler can take a CSS reference as input and return a URI to the CSS file to be put into the HTML output.