views:

16

answers:

1

Hi all,

My company is going to use Azure environment for future applications. However, currently, Azure does not allow us to deploy reports to Azure SQL Server. Therefore, the only way to show report is using local ReportViewer.

My job is to write a reporting engine that using local ReportViewer to show the report. However, I am facing difficulties about using DataSources and DataSets information in the RDLC file.

Challenge 1: LocalReport.LoadReportDefinition() method does not retrieve DataSources and DataSets information. How can I get DataSources and DataSets information from RDLC file?

Challenge 2: After I get DataSources and DataSets information, how can I use those information to generate DataSet? Although I could phase the DataSources and DataSets information by XML processes, but it is so hard to handle all cases myself.

In simple words, I am trying to simulate the getting data process in server side but using local report.

Thank you so much!

A: 

SSRS reports categorized into 2 type.

1- Server Reports 2- Client Reports (local)

every 2 type is work in server side but there are differences. in rdlc reports you must like below to bind dataset to your report:

    rds.Name = Constants.Accounting.ClientReportDataSourceName.GeneralReportDS;
    rds.Value = ((GeneralReport)Session[Constants.Accounting.Session.GeneralReport]).Tables[0];
    ReportViewerControl.LocalReport.DataSources.Add(rds); 
masoud ramezani
Thanks for your answer. In this way, you have already know the detail of your report and than pass a "suitable" DataTable to the report.How if I don't know the detail of report, I would like to dynamically generate the DataTable by the RDLC file detail. RDLC actually has already defined connection string, query, transaction...etc for connecting database (or other kinds of sources).How can I dynamically generate my DataTable by the RDLC file?
Alex Yeung
you must analyze the rdlc xml file that is very difficult.
masoud ramezani