RDLC Reporting with 2 subreports in Visual Studio 2010 Windows Application [Resolved]

Posted by Alibasha under C# on 4/26/2013 | Points: 10 | Views : 6479 | Status : [Member] | Replies : 9
Hi,
I am new to .Net Funda, I have gone through the article Title "RDLC Reporting in Windows Application" here http://www.dotnetfunda.com/articles/article2204-rdlc-reporting-in-windows-application.aspx. It was great, can any body help me in implementing subreports inside main rdlc in VS 2010 Windows application. My Requirement is as follows,need to develop Main Report with 2 SubReports all 3 reports will be calling same SP, SP has 4 input parameters, the last paramter will change depending on the report.For example Main Report is to display Address,Subreport1 for CashDetails and Subreport2 to display TradeDetails. Means the first 3 input parameters will be same for all the reports ,but the fourth parameter is 0 for Address and 1 for CashDetails and 2 for TradeDetails. Thanks in advance.




Responses

Posted by: Alibasha on: 4/29/2013 [Member] Starter | Points: 25

Up
0
Down

Resolved
Hi,
Thanks for your kind help. I have found a solution which matches exactly to my requirement. Please find the attached file in which there is explanation in images step by step, FYI I have added my source code in seperate note pad. I request you to delete the attachment which I have sent on 4/26/2013 5:19:07 AM, as it will be not useful to any body.
 Download source file

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 4/26/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi abhilasha,

In your Case you will have to generate 3 reports and you will have to switch reports on the base of the fourth parameter
For eg :- if the 4th parameter is 0 then load the report of Address and so on...


Note :- The above solution will only work if the stored proc is getting all the required fields for all the four report.

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alibasha on: 4/26/2013 [Member] Starter | Points: 25

Up
0
Down
Thanks for your kind and quick reply. Basically I am new rdlc reports, so can you please give me sample/link/demo where I can find subreports inside a rdlc in VS 2010 windows application.So that I can accomplish my current requirement.

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alibasha on: 4/26/2013 [Member] Starter | Points: 25

Up
0
Down
Thanks for your kind and quick reply. Basically I am new rdlc reports, so can you please give me sample/link/demo where I can find subreports inside a rdlc in VS 2010 windows application.So that I can accomplish my current requirement.

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 4/26/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Abhilasha,

It will be difficult to find the exact link for you but if you can post your table and stored proc i can check what can be done.


Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alibasha on: 4/26/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
Please find required i/p for the current requirement inlcuding SP in NotePad,Reports Result in Excel and Sample Report in Image format in attached zip file.
 Download source file

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 4/26/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi abhilasha

I went through the attachment, just wanted to know is the data for Cash Details,Address and Trade details are having different tables and what is the uniqueness to bind each of them so that i can give you a sample of the reports

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 4/26/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello abhilasha

Looking at the Excel file i dont see difference in the second and the third report except for the count of records

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alibasha on: 4/29/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
Thanks for your kind help. I have found a solution which matches exactly to my requirement. Please find the attached file in which there is explanation in images step by step, FYI I have added my source code in seperate note pad. I request you to delete the attachment which I have sent on 4/26/2013 5:19:07 AM, as it will be not useful to any body.
 Download source file

Alibasha, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response