In version 2.2.2, I had a property binding on my datasource so that at runtime, the engine would use the JNDI URL if a deployed app, and if in the designer, it would use a user/password. I learned how to do this from the following document. It describes property binding code that returns a user/pass if in the designer - forcing a jdbc connection, and returns null if not in the designer causing the JNDI url to be used :<br />
<br />
<a class='bbc_url' href='
http://www.google.com/url?sa=t&source=web&ct=res&cd=5&url=http://dev.eclipse.org/newslists/news.eclipse.birt/doc8E60mywdNC.doc&ei=BaQkScn5HIyQ9QTF3bli&usg=AFQjCNE9ryBmWl3uiDcMp9V40WHnZb1P2A&sig2=ZTCzbsFqw8GUKA4oex297w'>http://www.google.com/url?sa=t&source=web&ct=res&cd=5&url=http://dev.eclipse.org/newslists/news.eclipse.birt/doc8E60mywdNC.doc&ei=BaQkScn5HIyQ9QTF3bli&usg=AFQjCNE9ryBmWl3uiDcMp9V40WHnZb1P2A&sig2=ZTCzbsFqw8GUKA4oex297w</a><br />
<br />
The issue is that in 2.3.1, the binding does not work. If I remove the following code from my rptdesign, it works, but if it is in there, it fails with "Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc. There is an error in get connection, invalid arguments in call."<br />
<br />
Here is the binding. It is taken verbatim from the document above and works in 2.2.2 but not 2.3.1 in the designer (dont know if it works for deployed artifact or not)...<br />
<br />
<list-property name="propertyBindings"><br />
<structure><br />
<property name="name">odaUser</property><br />
<property name="id">62</property><br />
<expression name="value">xyz = reportContext.getHttpServletRequest().getParameter("__designer");<br />
if (xyz)<br />
{<br />
"fraud";<br />
}<br />
else<br />
{<br />
"";<br />
}</expression><br />
</structure><br />
<structure><br />
<property name="name">odaPassword</property><br />
<property name="id">62</property><br />
<expression name="value">xyz = reportContext.getHttpServletRequest().getParameter("__designer");<br />
if (xyz)<br />
{<br />
"fraud02";<br />
}<br />
else<br />
{<br />
"";<br />
}</expression><br />
</structure><br />
</list-property><br />
<br />
<br />
Since last entering this, I have found the issue and it is a bug. The __desginer parameter is not being passed on the url to the previewer in the birt eclipse ide. here is the output for birt 2.2.2 showing all parmters sent to the previewer:<br />
attributeBean is org.eclipse.birt.report.context.ViewerAttributeBean@1e7ed2d<br />
SoapURL is <a class='bbc_url' href='
http://127.0.0.1:53479/viewer/run?__...Fsrc/main/'>http://127.0.0.1:53479/viewer/run?__...Fsrc/main/</a><br />
parms...<br />
-1124381485 is<br />
__svg is false<br />
__rtl is false<br />
__designer is true<br />
__report is C:homeq-mavenprojectsfraudfraud-reportingsrcmainreportrptVpReviewCompleted.rptdesign<br />
__masterpage is true<br />
__maxrows is 500<br />
__locale is en_US<br />
__maxlevels is 50<br />
__cubememsize is 10<br />
__format is html<br />
__resourceFolder is C:/homeq-maven/projects/fraud/fraud-reporting/src/main/<br />
<br />
<br />
<br />
here is the output for birt 2.3.1 showing all parmters sent to the previewer:<br />
<br />
attributeBean is org.eclipse.birt.report.context.ViewerAttributeBean@8eb7f9<br />
SoapURL is <a class='bbc_url' href='
http://127.0.0.1:50384/viewer/run?__...in/&__dpi=96'>http://127.0.0.1:50384/viewer/run?__...in/&__dpi=96</a><br />
parms...<br />
__svg is false<br />
296980488 is<br />
__rtl is false<br />
__report is C:homeq-mavenprojectsfraudfraud-reportingsrcmainreportrptVpReviewCompleted.rptdesign<br />
__masterpage is true<br />
__format is html<br />
__maxrowlevels is 50<br />
__locale is en_US<br />
__maxrows is 500<br />
__maxcolumnlevels is 50<br />
__cubememsize is 10<br />
__resourceFolder is C:/homeq-maven/projects/fraud/fraud-reporting/src/main/<br />
__dpi is 96<br />
<br />
<br />
<br />
How do I get the __designer paramter to be sent to the previewer in birt 2.3.1 on ganymede?