Search code examples
c#asp.netvisual-studio-2010crystal-reports

Chart not showing in crystal reports


I am trying to show Charts using crystal reports in vs2010 but chart is not showing up in the browser. it looks like the screenshot below.

enter image description here

ReportDocument rptDoc = new ReportDocument();
dsSample ds = new dsSample(); 
DataTable dt = new DataTable();

dt.TableName = "Crystal Report Example";
dt = getAllOrders(); 
ds.Tables[0].Merge(dt);

rptDoc.Load(Server.MapPath("graphReport.rpt"));

thanks!


Solution

  • Here you need to configure you web.config file to make crystal reports handle your charts and images in it. add following setting in the web.config file

    -----In <system.web> section add

    <httpHandlers>
    
          <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    
        </httpHandlers>
    

    This will handle you images and charts in crystal reports

    Best of luck...