BIRT 2.6.1 ....For each row in Parent Dataset; Child does not change [message #1437052] |
Fri, 03 October 2014 20:47 |
Robert Clarkson Messages: 1 Registered: October 2014 |
Junior Member |
|
|
I am using BIRT 2.6.1 for Troux Reporting.
In the report I have a Main Dataset that return Rows. One of the columns in the Main dataset is Owner_IT, which is the owner of an application in the row. The report groups on the OWNER_IT. I created a second Dataset which gets chart data for a pie chart for each Owner_IT. I passed a value via a parameter from Main to secondary Dataset. I assign the parameter in the "OnFetch" method with ... params["ITO"] = row["IT_OWNER"]; Then I get the value in the "BeforeOpen" method of the secondary dataset with...
var qry = this.queryText;
var whereClause = " WHERE ";
whereClause += " IT_OWNER = '" + params["ITO"] + "' ";
this.queryText = qry + whereClause;
And it seams to pass a value, somewhat. It only passes the last value for OWNER_IT. As a Result, I get a report with Each OWNER_IT grouped with their applications, but when it shows the pie chart, it shows the same (last Owner_IT value) for each of the pie charts, instead of values for each of the OWNER_ITs
I'm told that one needs to turn of the cache for the secondary dataset, but I'm not sure how to do that, or if that will work. I tried to make a "dummy" dataset parameter, but that didnot work.
|
|
|
Re: BIRT 2.6.1 ....For each row in Parent Dataset; Child does not change [message #1441462 is a reply to message #1437052] |
Thu, 09 October 2014 19:30 |
|
For the inner dataSet, you should set up the query like:
select * from table where OWNER_IT = ?
When you embed your chart into the grouped outer table, you can simply pass the outer table value to the inner query by going to the binding tab in the property editor for the chart and clicking on the dataset parameter binding button. Choose to pass that outer table's value through and that should do it. I can make a simple example of this if you'd like. Let me know.
Michael
Developer Evangelist, Silanis
|
|
|
Powered by
FUDForum. Page generated in 0.03305 seconds