Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Error in trying to get Dynamic ListBox Parameters for report - Plz help
s_^_s
Hi Experts,<br />
A little background of my problem -<br />
I am creating a report which would show certain data based on a parameter that user has 'selected' from a dynamically populated list. <br />
These parameters are themselves to be fetched from another table and the user only has to select one or more of these.<br />
My data is split/sharded into multiple databases (same db structure, but different dbnames), we have split the data into different databases, say, one for each department. Based on user's department-id, I send a hidden parameter to report in the initial URL, using which the appropriate 'connection profile store' file is picked by the report.<br />
<br />
This works fine for the reports which <span class='bbc_underline'>do not need</span> a dynamic Listbox (from which user can select one/more ProductLines).<br />
<br />
But if I try to add a dynamic listbox parameter (populated by another dataset in same report), then I get error before the listbox is populated and the list comes empty.<br />
<br />
Please guide what am I doing wrong?<br />
<br />
I am using WebViewerExample tomcat app.<br />
<br />
I get this error:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
WARNING: handle type: org.eclipse.birt.report.model.api.OdaDataSetHandle
Jun 27, 2010 3:53:06 PM org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection open(Properties)
WARNING: Unable to open a connection with the database connection profile.
org.eclipse.datatools.connectivity.oda.OdaException: Unable to find the connection profile referenced by the data source connection properties.
at org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection.open(Connection.java:104)
</pre>
Attachment has the full StackTrace:<br />
<br />
<strong class='bbc'>Update:</strong> I am definitely doing something wrong !! Even the reports which were working on my windows machine stopped working when I deployed them on a linux server. <br />
<br />
Guys, I would really appreciate if you could guide me on the correct procedure here..<br />
<br />
Basically I copied the WebViewerExample tomcat app from windows onto the unix tomcat's webapps. It runs fine..<br />
The .rptdesign files, the birt-library (.rptlibrary) and the connection profile store (xml) files were already within the WebViewerExample, so I figure those should be fine..<br />
I then edited the connection-profile-store xml and gave it the path of mysql-driver jar (jarlist) on the linux box. I also updated the dbname and userid/password as per the server box's db.<br />
<br />
But the reports which were originally working in windows also stopped working on linux, giving the exact same error.. !! <br />
<br />
Any insights would be really helpful.
Find more posts tagged with
Comments
JasonW
I am not certain but this may be a bug. Any chance you could log it? I assume if the dataset is not tied to a parameter but used in the report it works? As a work around you may be able to specify the properties in the beforeOpen event of the dataset. For example assume that I have a dataset with the query select productname from products that I tie to a dynamic parameter. I could change the query based on a url(not report) parameter in the beforeOpen script like:
var pl = reportContext.getHttpServletRequest().getParameter("prodline");
if( pl != null ){
this.queryText = "select productname from products where productline = '"+ pl+"'";
}
This script will work even if the dataset is tied to a dynamic report parameter.
Jason
s_^_s
Hi Jason,
Thanks for your inputs,
I will retry this and will report on bugzilla..
However, can you also comment on the update in my orig.post.
Even the reports that are working on Windows are not working when shifted to Linux box. The jarlist points to correct location of mysql driver and it's owned by tomcat, yet not working..
Or to rephrase, what's the recommended methodology of moving a reports from dev to prod environment, when using connection profiles. (My datasource is infact from a library)
Or is there any other better recommended method than the use of connection profile store.
.
-Sebastian
JasonW
Sebastian
I sent the question to Linda on the DTP team. Hopefully she will respond on the news group. Any chance you could try it with BIRT 2.6?
Jason
s_^_s
For the sake of other users who might be getting this error, the reason was that Birt auto inserts a property binding <br />
eg:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><list-property name="propertyBindings">
<structure>
<property name="name">OdaConnProfileStorePath</property>
<property name="id">11</property>
<expression name="value">reportContext.getAppContext().get("birt.viewer.resource.path")+"\\birtconn\\cps"+params["someparamforswitching"].value+".xml"</expression>
</structure>
</list-property>
</pre>
This same thing does not work on linux (Fedora for my case), so had to do some trial and error before arriving at:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<list-property name="propertyBindings">
<structure>
<property name="name">OdaConnProfileStorePath</property>
<property name="id">11</property>
<expression name="value">"/path/to/webapps/WebViewerExample/birtconn/cps"+reportContext.getHttpServletRequest().getParameter("someparamforswitching")+".xml"</expression> </structure>
</list-property>
</pre>
<br />
Please note that I was in a rare situation where same report was running against different databases (same structure, different db names/locations), so we switch the connection at run-time based on value of 'someparamforswitching', by using different 'connection profile store' files.<br />
<br />
-Sebastian