Answered by:
read reporting service dataset/datasource by c# code

Question
-
Hi all,
I have a .rdl report file, a dataset and a datasource in reporting service, what I want is use my c# code to read and use the dataset and datasource, could you enlighten me about how to do that?
Thank you very much.
-Regards,
Aaron
jun
Tuesday, January 8, 2013 5:39 AM
Answers
-
Hello,
The shared datasource definition file (.rds file) and shared dataset defination file(.rsd) file are XML file, we can read the XML file in C# application.
As pre my understanding, the ADO.NET DataSet object is cretaed with different schema, so we cannot use the report shared dataset directly in C# application.
If I miss anything, please let me know.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support- Proposed as answer by Mohammad Nizamuddin Wednesday, January 9, 2013 11:13 AM
- Edited by Fanny Liu Thursday, January 10, 2013 1:50 AM
- Marked as answer by Aaron Zhang (Jun) Monday, January 14, 2013 2:44 AM
Wednesday, January 9, 2013 10:13 AM
All replies
-
Hi Aaron,
Do you means you want to process and display the .rdl report in your C# application? If so, you can convert the .rdl file to .rdlc file and use ReportViewer control in Visual Studio to display the report.
For more information, please see:
ReportViewer Controls (Visual Studio)
Converting RDL and RDLC Files
Regards,
Fanny LiuFanny Liu
TechNet Community SupportWednesday, January 9, 2013 3:40 AM -
Hi Fanny,
Sorry for the misunderstanding I cause, let me explain some details again.
1 I have a report project, and inside I created a RDL file, a datasource and a dataset.
2 then I deploy this report in my product environment
3 then I want to develop a C# application, in this application, I'm not going to show the report, but just use the dataset and the datasouce I created just now. I hope I could get the datasource/dataset object from my report and reuse that in the c# application. Also, I'm not going to use the "render" way to get the data from the report for this is not an effective way.
Plese tell me if anything I can expatiate, thank you for notice :)
-Regards,
Aaron
jun
Wednesday, January 9, 2013 4:40 AM -
Hello,
The shared datasource definition file (.rds file) and shared dataset defination file(.rsd) file are XML file, we can read the XML file in C# application.
As pre my understanding, the ADO.NET DataSet object is cretaed with different schema, so we cannot use the report shared dataset directly in C# application.
If I miss anything, please let me know.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support- Proposed as answer by Mohammad Nizamuddin Wednesday, January 9, 2013 11:13 AM
- Edited by Fanny Liu Thursday, January 10, 2013 1:50 AM
- Marked as answer by Aaron Zhang (Jun) Monday, January 14, 2013 2:44 AM
Wednesday, January 9, 2013 10:13 AM -
Thank you for reply Fanny,
Is there any other way we can use the shared dataset in c# application? Or is there any document describe the schema of the Dataset?
Thank you.
-Regards,
Aaron
jun
Thursday, January 10, 2013 4:19 AM