two datasources
-
- Posts: 14
- Joined: Tue Dec 29, 2009 11:21 pm
- Location: Chennai
two datasources
Hi,
Is it possible to register two different datasources using RegData. ie.,
databand1.RegData(....);
databand2.RegData(....);
Very Urgent.
Is it possible to register two different datasources using RegData. ie.,
databand1.RegData(....);
databand2.RegData(....);
Very Urgent.
two datasources
Hi
Yes, that is possible.
report.RegData(MyDataSet1);
report.RegData(MyDataSet2);
report.CacheAllData = true;
(report.GetComponents()["MyDataBand1"] as StiDataBand).DataSourceName = "MyDataSourceName";
Thank you.
Yes, that is possible.
report.RegData(MyDataSet1);
report.RegData(MyDataSet2);
report.CacheAllData = true;
(report.GetComponents()["MyDataBand1"] as StiDataBand).DataSourceName = "MyDataSourceName";
Thank you.
-
- Posts: 14
- Joined: Tue Dec 29, 2009 11:21 pm
- Location: Chennai
two datasources
Hi,
I have done as you instructed.
I am attaching the code for your inspection.
Code:
BillmasterEntity bill = new BillmasterEntity(2);
PredicateExpression filter = new PredicateExpression();
filter.Add(BillmasterFields.Id == 2);
//tlBillDetail.Fill(0,null,false,filter);
CustomerEntity customer = new CustomerEntity(bill.Customerid);
billTransTypedList.Fill(0, null, true, filter);
StiReport report = StiReport.GetReportFromAssembly("rpBill.dll",true);
report.RegData("customer", customer);
report.RegData("BillMaster", bill);
report.RegData("BillTrans", billTransTypedList);
//DataBand Name is BillHeadBand
(report.GetComponents()["BillHeadBand"] as StiDataBand).DataSourceName = "BillMaster";
//DataBand Name is BillMasterBand
(report.GetComponents()["BillMasterBand"] as StiDataBand).DataSourceName = "customer";
//DataBand Name is BillTransBand
(report.GetComponents()["BillTransBand"] as StiDataBand).DataSourceName = "BillTrans";
report.PreviewControl = stiPreviewControl1;
report.Show();
I get no results in the report (Empty Report).
I have verified that all my business objects return data.
Please guide me in this regard.
I have done as you instructed.
I am attaching the code for your inspection.
Code:
BillmasterEntity bill = new BillmasterEntity(2);
PredicateExpression filter = new PredicateExpression();
filter.Add(BillmasterFields.Id == 2);
//tlBillDetail.Fill(0,null,false,filter);
CustomerEntity customer = new CustomerEntity(bill.Customerid);
billTransTypedList.Fill(0, null, true, filter);
StiReport report = StiReport.GetReportFromAssembly("rpBill.dll",true);
report.RegData("customer", customer);
report.RegData("BillMaster", bill);
report.RegData("BillTrans", billTransTypedList);
//DataBand Name is BillHeadBand
(report.GetComponents()["BillHeadBand"] as StiDataBand).DataSourceName = "BillMaster";
//DataBand Name is BillMasterBand
(report.GetComponents()["BillMasterBand"] as StiDataBand).DataSourceName = "customer";
//DataBand Name is BillTransBand
(report.GetComponents()["BillTransBand"] as StiDataBand).DataSourceName = "BillTrans";
report.PreviewControl = stiPreviewControl1;
report.Show();
I get no results in the report (Empty Report).
I have verified that all my business objects return data.
Please guide me in this regard.
two datasources
Hello,
It is hard to say something just having your code. Please send us a report sample to support@stimulsoft.com.
Thank you.
It is hard to say something just having your code. Please send us a report sample to support@stimulsoft.com.
Thank you.
-
- Posts: 14
- Joined: Tue Dec 29, 2009 11:21 pm
- Location: Chennai
two datasources
I removed these lines and tried to run the report.//DataBand Name is BillHeadBand
(report.GetComponents()["BillHeadBand"] as StiDataBand).DataSourceName = "BillMaster";
//DataBand Name is BillMasterBand
(report.GetComponents()["BillMasterBand"] as StiDataBand).DataSourceName = "customer";
//DataBand Name is BillTransBand
(report.GetComponents()["BillTransBand"] as StiDataBand).DataSourceName = "BillTrans";
Only the first registered data is displayed in the report. i.e.,
report.RegData("customer", customer);
report.RegData("BillMaster", bill);
report.RegData("BillTrans", billTransTypedList);
In this case, only the customer details is displayed. If I change the order say:
the bill master details are displayed.report.RegData("BillMaster", bill);
report.RegData("customer", customer);
report.RegData("BillTrans", billTransTypedList);
two datasources
Hi,
Please try to add report.Dictionary.Synchronize() command after RegData()
If you still face problems, sample project could be very helpful to speed up resolving of the issue.
Please send it to support[at]stimulsoft.com for analysis.
Thank you.
Please try to add report.Dictionary.Synchronize() command after RegData()
If you still face problems, sample project could be very helpful to speed up resolving of the issue.
Please send it to support[at]stimulsoft.com for analysis.
Thank you.
-
- Posts: 14
- Joined: Tue Dec 29, 2009 11:21 pm
- Location: Chennai
two datasources
Thanks for your patience.
I have worked around the problem using variables.:byebye:
I have worked around the problem using variables.:byebye:
two datasources
Hi,
Please let us know if you need any help.
Thank you.
Please let us know if you need any help.
Thank you.