reports RDLC in c #

2

I need to add two RDLC reports in a single control of ReportViewer in pure code, someone knows how to do it, since after I generate a PDF and I want the two reports to have that PDF, I have it now with just one RDLC:

ReportViewer viewer = new ReportViewer();
viewer.LocalReport.ReportPath = Path.Combine(directorioPrincipal, @"xxxx.rdlc");
viewer.LocalReport.EnableExternalImages = true;
viewer.LocalReport.SetParameters(lista);
viewer.LocalReport.DataSources.Add(repdata);
viewer.LocalReport.Refresh();
    
asked by Cesar Ramirez Monroy 16.03.2016 в 19:26
source

1 answer

1

You can not assign two .rdlc in the same ReportViewer

But if you could create a third .rdlc and use the other two within a subreport

Here

SSRS Series Part II: Working with Subreports, DrillDown Reports , Expressions and Custom codes, Databars, Indicators, Custom Sorting and Paging and many more

explains in more detail the subject of subreportes.

> > how do I make each .rdlc belong to one sheet each?

You could define a page break between the subreports so that each one appears on different pages

How to: Set Page Breaks (Visual Studio Report Designer)

    
answered by 16.03.2016 в 20:17