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)
Query parameters with joint dataset
mrab
I have a joint dataset that uses data from two datasets - one queries a MYSQL database and the other a DB2 database. After I successfully tested the query I defined parameters on the sql statement for the DB2 query. These parameters were propagated into the joint dataset. However, when I tried to use these parameters in a chart, I couldn't see them even though my datasource is the joint dataset. How can I use these parameters in the chart?
Thanks!
Find more posts tagged with
Comments
JasonW
Can you try adding a binding column to the chart. Select the chart and click on the binding tab. Select the add button. Set the expression to something like:
inputParams["param_1"];
Then use the new column in the chart builder.
Jason
mrab
Thanks for the response.
I added the parameter like this:
Data Type: Date
Expression: inputParams["psapprod::startDate"]
where psapprod::startDate is the name of the parameter as shown in the joint dataset (psapprod is the name of the DB2 dataset and startDate is the parameter I defined there). I can see the column (labeled 'Column Binding') in the column list for the joint data set, but I can't figure out how to use this column so that it will plug a value into the query for the dataset psapprod. Did I do this the way you intended and if so, what do you recommend for the next step?
Thanks!
Michele
JasonW
do you want to tie it to a report parameter or set it based on a tables data?
If so select the binding tab and click on the parameter button and set it to an outer containers column value. Have a look at this example.
http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1/subreport/index.php
Jason
mrab
I am actually trying to display several charts within the same report. Within each chart I wanted to limit what the query brought back (one chart for each hour). Because I couldn't see the parameters in the chart, I ended up using a filter. This works okay for this case since there isn't a great deal of data, although I'd rather limit the amount of data being returned rather than just filtering out what I don't need.
Thanks for your help!
Michele
JasonW
Can you post the report?
Jason