MS Report viewer(RDLC) - Report from 2 tables without joins

A

Ashutosh

Hi,
How can I display data from 2 tables in Microsoft Report viewer(RDLC). I
don't have to join the tables. The tables are not related. I have to put the
data from both of them on a single report.

Thanks & Regards,
Ashutosh
 
C

Colbert Zhou [MSFT]

Hello,

I am not aware of a way to do that. Since there is no relation between
these two tables, why do you want to put unrelated data into the same
report? That does not make sense to me. Based on my knowledge, we have to
join the two tables into one dataset and show them in the report viewer
control.

The following is a example,
http://www.codeproject.com/KB/webforms/ReportViewer.aspx


Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 
A

anoop.sihag

Ashutosh

There is nothing spl technique behind this. Just follow these steps:-

1.Create 2 dataset in RDLC file in respect to each table
2.Pass these 2 dataset from your code
ReportDataSource rds = new ReportDataSource("dsChart",
ObjectDataSource1);
ReportDataSource rds2 = new ReportDataSource("DataSet1",
ObjectDataSource2);
rptViewer.LocalReport.DataSources.Clear();
rptViewer.LocalReport.DataSources.Add(rds);
rptViewer.LocalReport.DataSources.Add(rds2);
 
A

anoop.sihag

Ashutosh

There is nothing spl technique behind this. Just follow these steps:-

1.Create 2 dataset in RDLC file in respect to each table
2.Pass these 2 dataset from your code
ReportDataSource rds = new ReportDataSource("dsChart",
ObjectDataSource1);
ReportDataSource rds2 = new ReportDataSource("DataSet1",
ObjectDataSource2);
rptViewer.LocalReport.DataSources.Clear();
rptViewer.LocalReport.DataSources.Add(rds);
rptViewer.LocalReport.DataSources.Add(rds2);
 
C

Colbert Zhou [MSFT]

Hello Ashutosh,

Any future follow ups on this thread?


Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 
C

Colbert Zhou [MSFT]

Hello Ashutosh,

Any future follow ups on this thread?


Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top