locked
To view the server report from report viewer RRS feed

  • Question

  •  

    I created the website to view the server reports through reportviewer.

    Here is the code.....

     

    using System;

    using System.Data;

    using System.Configuration;

    using System.Web;

    using System.Web.Security;

    using System.Web.UI;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    using System.Web.UI.HtmlControls;

    public partial class _Default : System.Web.UI.Page

    {

    protected void Page_Load(object sender, EventArgs e)

    {

    string AVNParam = "";

    string sReportId = Request.QueryString["ReportId"].ToString();

    if (sReportId == "AVN")

    {

    AVNParam = Request.QueryString["oId"].ToString();

    ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;

    ReportViewer1.ServerReport.ReportServerUrl = new Uri(http://sqlfs/crmreports);

    ReportViewer1.ServerReport.ReportPath = "/CRM/4.0/ order Notification";

    Microsoft.Reporting.WebForms.ReportParameter[] parm = new Microsoft.Reporting.WebForms.ReportParameter[1];

    parm[0] = new Microsoft.Reporting.WebForms.ReportParameter("sSiteId",AVNParam);

    ReportViewer1.ServerReport.SetParameters(parm);

    ReportViewer1.ServerReport.Refresh();

    }

    }

    }

     

    when i run the report is giving the  error that 

     "Parameter validation failed. It is not possible to provide valid values for all parameters. (rsParameterError)"

    "http://localhost:4743/AVNWebApp/AVNViewer.aspx?ReportId=AVN&oId=E0F4B5C3-2BA0-DD11-A64F-005056B02654"

    This is the parametrs i passed.....

    whats i am doing is correct?  where i am going wrong?

    please help me.....

     

     

     

    Wednesday, November 5, 2008 6:22 AM

Answers

  • Finally i got the solution for this.

    I made  mistake that, not putting the <identity impersonate="true"/> in web.config file

    Thursday, November 6, 2008 6:01 AM

All replies

  • When you run the report through CRM, have you been asked to provide any parameters?(e.g: modified by...), if so, you need to send those parameters in your custom app.

     

    Cheers,

    Jim

    Wednesday, November 5, 2008 10:38 AM
    Moderator
  • No just i am sending only one parameter has above mentioned(oId).

    Other parameters are there , but  i am retrieving data throuh Query

    Wednesday, November 5, 2008 11:15 AM
  • Finally i got the solution for this.

    I made  mistake that, not putting the <identity impersonate="true"/> in web.config file

    Thursday, November 6, 2008 6:01 AM