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)
Report Parameter - Multiple value problem
Elja
<p>Hey.</p>
<p> </p>
<p>I'm quite a new Birt (4.4) user. Although I've been able to find answers to most of my questions, there are some things I'd love to have some help with.</p>
<p> </p>
<p>PROBLEM IN NUTSHELL:</p>
<p>The problem I have is about report data disappearing when I deploy a second multi value report parameter.</p>
<p> </p>
<p>The report I'm building requires some user info passed via Report Parameters.</p>
<p>Two out of three Report Parameters work just fine, but as I deploy the last one, the report shows only the titles. All the data rows disappear. I've created 2 cascading parameters (single + multi value) + 1 regular report parameter (multi value).</p>
<p> </p>
<p>At first I thought the Data Sets SQL somehow fails when 2 multi value report parameters are used. But that doesn't seem to be the case: I removed the problematic parameter "RP_Palvelut" (with all references to it) and report worked fine.</p>
<p> </p>
<p>Then I removed the working parameter (RP_Ostovoiman_tila) and tried with the problematic one "RP_Palvelut" and again -> no data in the report.</p>
<p> </p>
<p>I executed all the different data sets SQL-statements (with fixed values, not parameters) in another db-application and they worked fine.</p>
<p> </p>
<p>Now, here are the details (in case you are able to help me):</p>
<p> </p>
<p>* 1. The main data set (attachment: Main_Data_Set_SQL.rtf)</p>
<p>* 2. The data set to collect the services, used to collect the selection for RP_Palvelut -report parameter (attachment: Data_Set_Services_SQL.rtf) -> this is the data behind the failing parameter)</p>
<p>* 3. The main data sets "Before open" value ("ostovoimat" works ok, "palvelut" doesn't):</p>
<p>this.queryText = this.queryText.replace("ostovoimat", params["RP_Ostovoiman_tila"].value.join("','" ));</p>
<p>this.queryText = this.queryText.replace("palvelut", params["RP_Palvelut"].value.join("','" ));</p>
<p>* 4. I attach the whole report (Asiakkaan_Kokonaisuus_TEST.rptdesign) also.</p>
<p> </p>
<p>Thanks a lot in advance, Elja</p>
Find more posts tagged with
Comments
Clement Wong
<p>Since I'm not able to run your design, or access your DB with those queries, your best bet is to troubleshoot this issue on your end is to output this.queryText. See if there's anything suspicious with the generated SQL by visually inspecting it, and also pasting the SQL into a client to see if there are any errors.</p>
<p> </p>
<p>Since you aren't using commercial BIRT which would have been a simple two lines to write to the Eclipse error log:</p>
<pre class="_prettyXprint">
logger = java.util.logging.Logger.getLogger("birt.report.logger");
logger.warning (this.queryText);</pre>
<p>In OS BIRT, you will need to write the SQL to a text file or write out to the console. See <a data-ipb='nomediaparse' href='
http://birtworld.blogspot.com/2010/01/quick-and-dirty-logging.html'>here
</a>for more information about the latter.</p>
Elja
<p>Hey.</p>
<p>It seems the problem is the data source SQL-output I use as the info displayed in report parameter: there are string -values containing "," -characters.</p>
<p>When storing the user chosen values in the report parameter, some of the string values include "," -characters which probably causes the data not been able to show in report.</p>
<p> </p>
<p>- Elja</p>
Clement Wong
<p>Good to know that it's the SQL syntax. BTW, you can also use the beforeOpen event and this.queryText to escape any of those characters so that it complies with your database's SQL syntax. Since you are using PostgreSQL, it uses dollar signs for escaping double quotes (<a data-ipb='nomediaparse' href='
http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING'>see
their document for reference</a>).</p>