How to add parameters to the SSRS report and parameters to the ssrs report

Source: Internet
Author: User

How to add parameters to the SSRS report and parameters to the ssrs report
 How to add parameters to an SSRS report

A problem occurs after the connection.The report is refreshed constantly after parameters are added to the report, which is the same as the refresh of the report. Then let's solve it.

 

1.

This is to add default parameters to the report and refresh continuously after entering the page.

ReportParameter para = new ReportParameter ("ReportParameter1", "1"); // parameter ReportViewer1.ServerReport. reportServerCredentials = new MyReportServerCredentials (); ReportViewer1.ServerReport. reportServerUrl = new Uri ("http: // Report Server address/reportserver"); ReportViewer1.ServerReport. reportPath = "/report name"; ReportViewer1.ServerReport. setParameters (new ReportParameter [] {para}); // input parameters

After this code is added to Page_Load, the problem may occur .. Loading is always displayed. It looks like a refresh.

Solution

  

if (!IsPostBack){
  
ReportParameter para = new ReportParameter ("ReportParameter1", "1"); // parameter ReportViewer1.ServerReport. reportServerCredentials = new MyReportServerCredentials (); ReportViewer1.ServerReport. reportServerUrl = new Uri ("http: // Report Server address/reportserver"); ReportViewer1.ServerReport. reportPath = "/report name"; ReportViewer1.ServerReport. setParameters (new ReportParameter [] {para}); // input parameters
}

 

In this way, the report is loaded by default.

Succeeded. The following is a concentrated report.

     

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.