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 => DataSet parameter
Laxapanj
I have a DataSet parameter DSP_Day, linked to a report parameter RP_Day.
DSP_Day is used in the LIKE clause of the SQL request of the dataset, in the format YYYY-MM-DD%.
I would like the user to enter the day with the format YYYY-MM-DD as report parameter, without the %. How can I modify this report parameter (append a %) when copying it into the DataSet parameter ?
Note that, as a workaround solution, I may drop the LIKE clause and use the SUBSTR function in the SQL request, but I am afraid it is less efficient.
Find more posts tagged with
Comments
mwilliams
Hi Laxapanj,
You could drop the dataSet parameter and just use the report parameter in script to call the correct data. You'd then just have to do something like the following in the beforeOpen script of the dataSet:
this.queryText = this.queryText + " where date = '" + params["parm_Name"] + "%'";
Or something along those lines. Hope this helps.
Laxapanj
Thanks for the idea.
I tend to avoid scripting, and particularly on the dataset. In my case, as I use the parameter 4 times in my request, I would rather have to use a replace() function to patch the request via the script. The problem is that it is not very intuitive if someone else needs to maintain the report. Moreover, if the request put in the dataset is not a valid one, the designer does not like it very much...
I am just a bit surprised that when linking report and dataset parameters, there is no advanced edition available to add some intelligence to the link.
mwilliams
Laxapanj,<br />
<br />
You can always create your own parameter page to handle parameters however you'd like.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/devshare/deploying-birt-reports/298-2-2-birt-tag-library/#description'>2.2
BIRT Tag Library - Tips & Tricks - BIRT Exchange</a><br />
<br />
Also, any requests for enhancements can be made <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>here</a>
.