简体   繁体   中英

Getting SSRS report Data in your asp.net application

I'm new to SSRS, I would like to know if it is possible to get the SSRS report data in an asp.net application in ordrer to get the value of a specific field (example: sum of assets, ...) ?

Is there any possibility to get the report data in json (webservice) or xml format, so that I can use c# code to get a specific column value ?

Thank's for the help

protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                try
                {
                    ReportViewer1.ProcessingMode = ProcessingMode.Remote;
                    ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://pc499:80/ReportServer_SQLEXPRESS");

                    ReportViewer1.ServerReport.ReportPath = "/ChartProject/Map";
                    ReportViewer1.ServerReport.Refresh();

                }
                catch (Exception ex)
                {
                    Response.Write(ex.ToString());
                }
            }

        }

SSRS reports bind from a datatable. Find the datatable you created for the SSRS report and do what you want with the data before or after your RefreshReport() call.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM