468,253 Members | 1,255 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,253 developers. It's quick & easy.

Adding SubReport to Report (WinForm)

3
I have a problem when try to add a SubReport to a report. I'm using Visual Studio 2010. I've two report and two DataSet, one of every report. I've created master-report (report1) and i've added a subreport (report2).

I've created this event in Form_Load:
Expand|Select|Wrap|Line Numbers
  1. this.reportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(MySubreportProcessingEventHandler);
and this function:
Expand|Select|Wrap|Line Numbers
  1. void MySubreportProcessingEventHandler(object sender,SubreportProcessingEventArgs e)
  2.         {
  3.          e.DataSources.Add(new ReportDataSource("parameter1", "parameter2"));
  4.         }
but i don't know what i've to write in parameter1 and parameter2.

my DataSet are:

DataSet with table A
DataSet1 with table B


Someone can help me?
Jun 1 '10 #1
2 2787
gigiot
3
@gigiot
Anybody?Please it's very important ..

Steven Cheng i've read your post on this link,

http://bytes.com/topic/asp-net/answe...ould-not-shown

and i tried, but nothing. When i've written

Expand|Select|Wrap|Line Numbers
  1. e.DataSources.Add(New ReportDataSource("AdventureWorksDataSet_Contact",
  2. Me.AdventureWorksDataSet.Contact))
the sequnce Me.AdventureWorksDataSet.Contact give me an error!!

My table name is ENERGIA and my data set name is DataSet2, but Me.DataSet2.ENERGIA dosen't work!!
Jun 3 '10 #2
gigiot
3
@gigiot
i've resolved my problem in another way, bye!
Jun 17 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Trevor Best | last post: by
5 posts views Thread by ken | last post: by
2 posts views Thread by Marco Bizzarri | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.