Two Data Sources
Two Data Sources
Hello Everybody,
I Have a question and I need Your help,PLS.
I want to create a report with two data sources(Two Stored Procedures).One for report and another for fill a object of the form.
I searched,Bud I didnot find a similar sample...
How can I Send two data sources from Visual Studio to the report?(I am Programming with ASP.Net and SQl)
Please put a sample for me(Or a Link).
I hope I made myself clear.
Thank you so much.
Regards Galawij.
I Have a question and I need Your help,PLS.
I want to create a report with two data sources(Two Stored Procedures).One for report and another for fill a object of the form.
I searched,Bud I didnot find a similar sample...
How can I Send two data sources from Visual Studio to the report?(I am Programming with ASP.Net and SQl)
Please put a sample for me(Or a Link).
I hope I made myself clear.
Thank you so much.
Regards Galawij.
Two Data Sources
Hello,
As a way, create two datatable for each procedure and put them in dataset and than register this dataset to report.
Thank you.
As a way, create two datatable for each procedure and put them in dataset and than register this dataset to report.
Thank you.
Two Data Sources
Thank you,Aleksey.
But I do not Know How Can I create Two data sources in a report??
Could you explain it in more details?
But I do not Know How Can I create Two data sources in a report??
Could you explain it in more details?
Two Data Sources
Hello,
Please see the following code:
Thank you.
Please see the following code:
Code: Select all
DataSet ds = new DataSet("Data");
SqlDataAdapter da1 = new SqlDataAdapter("exec proc1", connection);
DataTable dt1 = new DataTable("DataSource1");
da1.Fill(dt1);
SqlDataAdapter da2 = new SqlDataAdapter("exec proc2", connection);
DataTable dt2 = new DataTable("DataSource2");
da2.Fill(dt2);
ds.Tables.Add(dt2);
report.RegData(ds);
Two Data Sources
You can create a DataSet with 2 DataTables in .NET and two DataSources as DataTables in report.
Two Data Sources
ds.Tables.Add(dt2);
report.RegData(ds);
may i know , why it only assign dt2 into dataset and bind it out.
if let say, dt1 and dt2 is totally different data.then is it still working with this method?
report.RegData(ds);
may i know , why it only assign dt2 into dataset and bind it out.
if let say, dt1 and dt2 is totally different data.then is it still working with this method?
Two Data Sources
Hello,
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Thank you.
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Thank you.
Two Data Sources
ok...Aleksey wrote:Hello,
Please see the following code:Thank you.Code: Select all
DataSet ds = new DataSet("Data"); SqlDataAdapter da1 = new SqlDataAdapter("exec proc1", connection); DataTable dt1 = new DataTable("DataSource1"); da1.Fill(dt1); SqlDataAdapter da2 = new SqlDataAdapter("exec proc2", connection); DataTable dt2 = new DataTable("DataSource2"); da2.Fill(dt2); ds.Tables.Add(dt2); report.RegData(ds);
refer to this examples. da1 and da2 will read the data source by exec stored procedure. but i have follow this way to bind my data into report.
but i found that, the two cross tab actually is not bind properly. some more get a lot of error in binding report field. At the end, get error of 'Object reference not set to an instance of an object' while reportdataset is pass to stimul report viewer.
so, my question is: whether this method above it is work for 2 sql statement/ stored procedure bind into two cross tab???
i tried many times and tested, i believe that this method are not able to bind two cross tab.
correct me if i'm wrong. thank you!!!
Two Data Sources
Hello,
Please send us a sample project which reproduces the issue for analysis.
Thank you.
Please send us a sample project which reproduces the issue for analysis.
Thank you.