Monday, March 26, 2012

Report Viewer Problem In ASP.NET 2.0

Hi i have a problem using Report Viewer With SQL Reporting Services 2005.

The problem is report toolbar is display but NO DATA is displayed and the report commes out as EMPTY :(. Even the parameters are passed successfully because i can see them in the text-boxes on the report parameters tool bar. But Report is Empty :(.

I have the following code.

ReportViewer1.ServerReport.ReportServerUrl = new Uri(@."http://localhost/ReportServer"); ;

string reportPath = @."/MMM_MSRS/WebFormEvents";

ReportViewer1.ServerReport.ReportPath = reportPath

string cmp_id = "3803";

string vcli_id = "23649";

string cnct_id = "1";

Microsoft.Reporting.WebForms.ReportParameter[] Param = new Microsoft.Reporting.WebForms.ReportParameter[3];

Param[0] = new Microsoft.Reporting.WebForms.ReportParameter("cmp_id", cmp_id);

Param[1] = new Microsoft.Reporting.WebForms.ReportParameter("vcli_id", vcli_id);

Param[2] = new Microsoft.Reporting.WebForms.ReportParameter("cnct_id", cnct_id);

ReportViewer1.ServerReport.SetParameters(Param);

ReportViewer1.ServerReport.Refresh();

ReportViewer1.DataBind();

i think there might be problem in u r recordset.

you check u r resultset under the data tab of report designer. just pass the same parameters what you are passing in the report designer of the data tab(not on preview). check whether you are getting the results.

No comments:

Post a Comment