Switching between multiple reports (.rdlc) in a single report viewer
Posted
by
UserNameHere
on Stack Overflow
See other posts from Stack Overflow
or by UserNameHere
Published on 2012-09-18T02:59:44Z
Indexed on
2012/09/18
3:37 UTC
Read the original article
Hit count: 166
I have 2 reports, "report1.rdlc" and "report2.rdlc" and I want to be able to swap betweent the 2 of them in a single report viewer ("rv_1").
I also have 3 buttons:
btn_1 which does:
rv_1.LocalReport.ReportEmbeddedResource = "Application1.Report1.rdlc"
rv_1.RefreshReport()
btn_2 which does:
rv_1.LocalReport.ReportEmbeddedResource = "Application1.Report2.rdlc"
rv_1.RefreshReport()
btn_3 which does:
dim rds as new ReportDataSource
rds.name =
rds.value =
rv_1.reset()
rv_1.LocalReport.DataSources.add(rds)
rv_1.RefreshReport()
Now no matter what I put for rds.name and rds.value it leaves me with "A data source instance has not been supplied for the data source 'dataSetName_TableName'.
So my question is; what do I need to put there in order to get this to work correctly?
© Stack Overflow or respective owner