Hello. Is any possibility to give parameter to datasource of subreport? I have report which contains subreport. The subreport is using different datasource which needs parameter to execute. For example datasource of the main report writes out three rows and I need to give values from column paramID to datasource of the subreport as parameters.
Thanks.
How to give parameter to datasource of subreport
How to give parameter to datasource of subreport
Hello,
Please check attached report.
Thank you.
Please check attached report.
Thank you.
- Attachments
-
- 229.SQLSubReportWithParameters.mrt
- (27.68 KiB) Downloaded 718 times
-
- Posts: 5
- Joined: Fri Jan 29, 2010 4:44 am
How to give parameter to datasource of subreport
Hi Jan,
I have the same problem.
I have created a Report-Subreport by your Sample.
There are two Tables
Table1: Invoices tabble contains main infos as lngInvoiceID, lngCustomerID,...
Table2: Articles table contains several things what customer bought.// lngInvoiceID, lngArticleID...
I want to print concrete invoice with main infos and all articles what it contains.
Table1: select * from Invoices where lngInvoiceID = @InvID //lngInvoiceID included
Table2: select * from Articles where lngInvoiceID = @AInvID
Table2 has a parameter @AInvID =Table1.lngInvoiceID
Report:
Page1.DataBand1.DataSource = Table1 and Has a Supreport1
Subreport1.DataBand2.DataSource = Table2
Subreport1.DataBand2.MasterComponent = DataBand1 // It is Page1.DataBand1, I thing it is correct
In the application i give the @InvID parameter to the Report
Report[@InvID] = 1111;
It's OK, but the Report prints only main infos of Table1, Subreport1 is not printed.
In the SQL Server Profiler (MSQL) I could'nt find anything about SQl query of Subreport1
What i do wrong?
Thanks.
I have the same problem.
I have created a Report-Subreport by your Sample.
There are two Tables
Table1: Invoices tabble contains main infos as lngInvoiceID, lngCustomerID,...
Table2: Articles table contains several things what customer bought.// lngInvoiceID, lngArticleID...
I want to print concrete invoice with main infos and all articles what it contains.
Table1: select * from Invoices where lngInvoiceID = @InvID //lngInvoiceID included
Table2: select * from Articles where lngInvoiceID = @AInvID
Table2 has a parameter @AInvID =Table1.lngInvoiceID
Report:
Page1.DataBand1.DataSource = Table1 and Has a Supreport1
Subreport1.DataBand2.DataSource = Table2
Subreport1.DataBand2.MasterComponent = DataBand1 // It is Page1.DataBand1, I thing it is correct
In the application i give the @InvID parameter to the Report
Report[@InvID] = 1111;
It's OK, but the Report prints only main infos of Table1, Subreport1 is not printed.
In the SQL Server Profiler (MSQL) I could'nt find anything about SQl query of Subreport1
What i do wrong?
Thanks.
How to give parameter to datasource of subreport
Hi
Could you please send us a sample application to support[at]stimulsoft.com for reproducing of the problem? If possible, please attach a necessary data too.
Thank you.
Could you please send us a sample application to support[at]stimulsoft.com for reproducing of the problem? If possible, please attach a necessary data too.
Thank you.
-
- Posts: 5
- Joined: Fri Jan 29, 2010 4:44 am
How to give parameter to datasource of subreport
Hi Edward,
I have figured it out.
I have to set the Table2.ReconnectOnEachRow = true;
I'm new user.
Could you make a help file like as general window help, in what the user can search by content, index...?
I thing, it makes the beginning easer for new users.
Thank you.
I have figured it out.
I have to set the Table2.ReconnectOnEachRow = true;
I'm new user.
Could you make a help file like as general window help, in what the user can search by content, index...?
I thing, it makes the beginning easer for new users.
Thank you.
How to give parameter to datasource of subreport
Hi
Thank you for your feedback.
Please download chm files you requested from the following page:
http://stimulsoft.com/Documentation.aspx
also you always can search the forum
Thank you.
Thank you for your feedback.
Please download chm files you requested from the following page:
http://stimulsoft.com/Documentation.aspx
also you always can search the forum

Thank you.