locked
No valid report source is available RRS feed

  • Question

  • User-956459652 posted

    Hello There;


    I am trying to view my report files on  CrystalReport viewer in ASP.NET programmatically. by using the code blow;


                     CrystalReportSource reportsource = new CrystalReportSource();
                    CrystalDecisions.Web.Report report = new CrystalDecisions.Web.Report();
                    Guid reportid = new Guid(Request.QueryString["GUID"]);
                    string path = Server.MapPath("/Reports/") + dc.Reports.Where(k => k.OID == reportid).First().FileContent;
                    report.FileName = path;
                    reportsource.Report = report;
                    CrystalReportViewer1.ReportSource = reportsource;
                




    it is working fine it it is a normal basic report, but if it has any group tree or parameter, when I try to expand any node of the group tree, it says No valid report source is available. but if I do it via CrystaReportSource wizard there is no problem at all.
    
    
    what do I miss here?
    
    
    thanks for your help.
    
    
    regards.
    Tuesday, November 3, 2009 5:31 AM

All replies

  • User245461779 posted

    I think you need to rebind report again.

    Write your code in page_load event and try.

    protected void Page_Load(object sender, EventArgs e)
            {
                // attached our report to viewer and set database login.
                ReportDocument report = new ReportDocument();
                report.Load(Server.MapPath("CrystalReport1.rpt"));
                //report.SetDatabaseLogon("username", "pwd", @"server", "database");
                rptviewer.ReportSource = report;
            }

    Tuesday, November 29, 2011 7:20 PM
  • User-2001765250 posted

    Refer the following link .

    Check the Report name and check is it getting connection properties.

    http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/7345fc6c-9749-42a3-b866-509c57f3cc35/

    Wednesday, November 30, 2011 4:11 AM
  • User1196771204 posted

    hi there,

    In addition to the previous response, there are several requirements to run Crystal Report:


    1. Please make sure the CR version installed on the server matches the one you use on your application/website
    2. Please make sure that the assemblies of the CR installed on the server are referenced correctly on your web.config
    3. Please make sure you set the application pool of your application to operate under LOCAL SERVICE permission
    4. Please make sure FULL TRUST mode is enabled on your operating folder
    5. Please make sure crystalreportviewer and aspnet_client folders are copied to your operating folder.

    Should you still have problems, you can consider hosting it with asphostcentral.com.

    Please mark this response as an "answer" if it helps you. Thanks heaps

    Wednesday, November 30, 2011 5:35 AM