Issue getting the details from the dataset using the value from master table
Hi,
I am naive user of birt 2.3.2, and I have been doing some research regarding the issue I have and could'nt get to work it out.
I have to design a report using subreport template.
So I have 2 data sets(scripted type), mainDataSet and subDataSet.
Below is the query for mainDataSet's open() method
sqlText = "select pr.prnum, pr.description, pr.purchaseagent, pr.requestedby, "
+ " pr.totalcost, pr.vendor, companies.name, pr.shipto, pr.shiptoattn "
+ " from pr left outer join "
+ " companies on "
+ " pr.vendor = companies.company "
+ " and pr.orgid = companies.orgid "
+ " where " + params["where"]
;
Query for SubDataSet's open method is below;
sqlText = "prline.prlinenum, prline.itemnum, prline.linetype, prline.description prlDescription, "
+ " prline.manufacturer, prline.modelnum manuPartNum, prline.catalogcode vendorPartNo, pr.shipto "
+ " prline join pr"
+ " where pr.prnum = prline.prnum "
+ " and pr.siteid = prline.siteid "
+ " and prline.prnum = ?";
1
//+ " and prline.prnum = '" + rows[0]["prnum"] + "'" ;
2
Basically, subdataset is using the prnum from maindataset to get the result. Line 1 and 2 above are the 2 ways I tried to get the prnum.
In the layout, I have maindataset resultset in header of table, and detail section holds the subdataset result set. Grouping on prnum. When I preview the result, I get the values for maindataset, but the detail section which holds the values from subdataset is not working, I mean the result set is not fetched.
Please help me to solve this issue.
I am attaching the xml source of both the datasets.
Thanks in advance.