Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Problem with parameters in BirtExportReportDialog.js
system_migrated
I have been working for a couple of weeks in a web app using birt for reporting using v.2.5.2 and I had stumbled into a lot o problems to do simple things, needing to hack almost everything with scripting but this one is a bit too serious.
I have a report with a dataset parameters, to fetch them I have the same report parameters that just pass the values to the datasets but to integrate the viewer with our app we have done our own parameter form so I just set the params via <birt:params> under the viewer (html output, frameset mode) (birt:param tag don't work with EL expressions but thats another problem)
Anyway using birt:param creates hidden inputs to set the parameters wich is great but the BirtExportReportDialog.js doesn't process them so when I try to export the report I just get and empty report.
If there is not any other option I will modify the js to process the hidden inputs but it seems so obvious that params should be preserved (or at least give the option to do so) that I wanted to share it with you.
Find more posts tagged with
Comments
Migrateduser
Fixed with the following code at "__exportAction" function<br />
<br />
var paramContainer = parent.document.getElementById("params_birtViewer");<br />
var oParams = paramContainer.getElementsByTagName('input');<br />
if( oParams ) {<br />
for( var i=0;i<oParams.length;i++ ) {<br />
//alert(oParams
.name + "_" + birtUtility.getURLParameter(action,oParams
.name));<br />
if (birtUtility.getURLParameter(action,oParams
.name) == "")<br />
action = birtUtility.addURLParameter(action, oParams
.name, oParams
.value); <br />
}<br />
}