Error creating Chart in CRM 7.1 on ASP

Hi,

I am trying to create a chart in a CRM asp page, using the info from the Sage Developer guide. It is CRM 7.1g.

When I run the page, it basically seems to crash CRM and we must restart the program. It seems like it recycles the app pool or something (CRM then takes a minute to start up, just like when you reset IIS). All the users are logged off.

This error appears in the logs.

This error is in the System Log files.
Feb 20 2013 13:29:48.412 5204 1800 1 CRMOpenThreadTokenWinVista
Feb 20 2013 13:39:20.810 5204 10888 1 Chart properties read from "c:\program files (x86)\sage\crm\crm\wwwroot/Themes/FusionChart/color/color1.fsn":" bgColor="ffffff" showBorder="0" canvasBorderColor='C1D59F' canvasBorderThickness='1' canvasBorderAlpha='50' showPlotBorder='0' showAlternateHGridColor='0' showAlternateVGridColor='0' divLineColor='69923A' divLineThickness='1' divLineAlpha='10' useRoundEdges='1' paletteColors='69923A,00A1DE,F2AF00,9E3039,C55E9B,652D86,A8B400,00338D,5E172D,DBCEAC,CD202C,201C3E,024731,A0D6D2,C99272,E98300,772059,C1AFE5' showLegend='0' pieYScale='80' plotGradientColor=' ' labelDisplay='rotate' slantLabels='1' chartRightMargin="10" chartTopMargin="5" chartBottomMargin="15" useRoundEdges="1" showShadow="1" use3DLighting="1" showPercentValues="1" showValues="0" showLabels="1" enableSmartLabels="1" isSmartLineSlanted="1" enableRotation="0" formatNumberScale="1" forceDecimals="0" yAxisValueDecimals="2" rotateYAxisNames="1" manageLabelOverflow = "1" useEllipsesWhenOverflow = "1" "
Feb 20 2013 13:39:21.054 5204 10888 1 About to create FLASH image in:"c:\program files (x86)\sage\crm\crm\wwwroot\Temp\Temporary Image Files\Idavid-20130220133921012.jpg"
Feb 20 2013 13:39:22.028 5204 10372 1 Exception caught and logged. Exception ID:1413465031
Feb 20 2013 13:39:25.656 9680 5628 1 startup,version,dllsize,dlldate,exehost,imagebase,reference Version 7.1.g 11743232 Oct 31 2012 14:20:34.000 C:\Windows\SysWOW64\inetsrv\w3wp.exe 1A8E216C #line#

The code is the same code from the Developer Guide

e.g.

var chart = CRM.GetBlock('chart');

with (chart)

{ Stylename('Area');

Title='Forecast over time';

Description='Forecast of Opportunity over time';

Resize(600,600);

ShowLegend(false);

MinY=0;

LabelX='Date';

LabelY='Forecast';

XProp="Oppo_Forecast";

XLProp="Oppo_CreatedDate";

YProp="Oppo_Forecast";

SQLText='Select top 100 * from Opportunity';}

container = eWare.GetBlock('container');

container.AddBlock(chart);
eWare.AddContent(container.Execute());

  • 0
    Hi,
    We have written a blog that will guide you to generate a pie chart in Sage CRM. Please follow the below blog link for the same.
    Hope this information helps!
    Regards,
    Dinesh
  • 0

    Thanks DInesh. However i ran that exact code, line for line, and got the same error - CRM website crashed, with this error in the logs.

    21 2013 8:28:40.766 5984 4912 1 Chart properties read from "c:\program files (x86)\sage\crm\crm\wwwroot/Themes/FusionChart/color/color1.fsn":" bgColor="ffffff" showBorder="0" canvasBorderColor='C1D59F' canvasBorderThickness='1' canvasBorderAlpha='50' showPlotBorder='0' showAlternateHGridColor='0' showAlternateVGridColor='0' divLineColor='69923A' divLineThickness='1' divLineAlpha='10' useRoundEdges='1' paletteColors='69923A,00A1DE,F2AF00,9E3039,C55E9B,652D86,A8B400,00338D,5E172D,DBCEAC,CD202C,201C3E,024731,A0D6D2,C99272,E98300,772059,C1AFE5' showLegend='0' pieYScale='80' plotGradientColor=' ' labelDisplay='rotate' slantLabels='1' chartRightMargin="10" chartTopMargin="5" chartBottomMargin="15" useRoundEdges="1" showShadow="1" use3DLighting="1" showPercentValues="1" showValues="0" showLabels="1" enableSmartLabels="1" isSmartLineSlanted="1" enableRotation="0" formatNumberScale="1" forceDecimals="0" yAxisValueDecimals="2" rotateYAxisNames="1" manageLabelOverflow = "1" useEllipsesWhenOverflow = "1" "

    Feb 21 2013 8:28:40.821 5984 4912 1 About to create FLASH image in:"c:\program files (x86)\sage\crm\crm\wwwroot\Temp\Temporary Image Files\Idavid-20130221082840806.jpg"

    Feb 21 2013 8:28:41.700 5984 7084 1 Exception caught and logged. Exception ID:4116695538

  • 0

    Hi Cosgrav,

    There might be chances of junk characters getting added in your code when you copied the code from our blog site. We would suggest you to copy the same code in text editor and remove the junk characters in it i.e. check for the quotation marks in the code and replace it with the proper syntax. You can also refer the below code.

    <%

    var sContainer=CRM.GetBlock("container");

    var strSQL = "select count(comp_companyid) as 'mycount', 'Class 1000' as 'mytype' from Company where comp_deleted=0 union select count(comp_companyid) as 'mycount', 'Class 3000' as 'mytype' from Company where comp_deleted=1 union select count(comp_companyid) as 'mycount', 'With no class' as 'mytype' from Company where comp_deleted is null";

    var myBlock=CRM.GetBlock("chart");

    with(myBlock)

    {

    Stylename("Pie");

    xlprop="mytype";

    yprop="mycount";

    SQLText= strSQL;

    ImageWidth=950;

    }

    sContainer.AddBlock(myBlock)

    Response.Write(sContainer.Execute());

    %>

    Hope this helps now!

    Regards

    Dinesh