sastrysagi

Members
  • Content count

    8
  • Joined

  • Last visited

Posts posted by sastrysagi


  1. hi I used the sample code

    given below and find the attachment with error message

    <html>
    <head>
     <title>
     FusionCharts Client-side Export Sample
     </title>
     <script language="JavaScript" src="../../FusionCharts/FusionCharts.js"></script>
     <script language="JavaScript" src="../../FusionCharts/FusionChartsExportComponent.js"></script>
     <script type="text/javascript">
     function startExport(){
     //Get reference to chart.
     
        var chart = getChartFromId("myChartId");
     //Now, we proceed with exporting only if chart has finished rendering.
     //We do not check rendering of export component, as FusionCharts Export Object JS
     //has a built-in queue that stacks up the export request until the component is ready.
     if (chart.hasRendered()==true){
      //chart.exportChart();
       chart.print();
     }else{
      alert("Please wait for the chart to finish rendering, before you can invoke exporting");
     }
     }
     </script>
    </head>
    <body bgcolor="#ffffff">
    <div id="chartdiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>
      <script type="text/javascript">
       //Create the chart.
     //Note that you necessarily need to set the registerWithJS attribute as 1, as JavaScript is used for client-
     //side communication between the chart and FusionCharts Exporter Component.
     var myChart = new FusionCharts("../../FusionCharts/Column2D.swf", "myChartId", "500", "300", "0", "1");
     myChart.setDataURL("ClientSideSimple.xml");
     myChart.render("chartdiv");
      </script>
     <!-- We also create a DIV to contain the FusionCharts client-side exporter component -->
     <div id="fcexpDiv" align="center">FusionCharts Export Handler Component</div>
     <script type="text/javascript">
       //Render the export component in this
     //Note: fcExporter1 is the DOM ID of the DIV and should be specified as value of exportHandler
     //attribute of chart XML.
     
       var myExportComponent = new FusionChartsExportObject("fcExporter1", "../../FusionCharts/FCExporter.swf");
     
        //Render the exporter SWF in our DIV fcexpDiv
       myExportComponent.Render("fcexpDiv");
      </script>
      
      <center><input type='button' value='Begin Chart Export' onClick="javascript:startExport();">
    </body>
    </html>
    

    Please let me know why i am unable to get the print. this is what i get in the ExportChartSamples under code section under Fusion Chrats site bundle 3.1 version.

    Thanks in advance.

    V.U.M.Sastry Sagi

    post-4728-128441571409_thumb.png


  2. Hi Dhruva Ghosh,

    I tried that but it is not working for me. I am using

    /**

     *  @package: FusionCharts Export Component

     *  =======================================

     *

     *  @description:

     *  This JavaScript contains all the relevant codes to make FusionCharts Export Component to function.

     *  Copyright © InfoSoft Global Pvt. Ltd. (http://www.infosoftglobal.com/)

     *

     *  @version: 1.0

     *  @published: 2009-02-20

     * 

     */

    and

    /**

     * FusionCharts: Flash Player detection and Chart embedding.

     * Version: 1.2.3 (15th September, 2008) - Added fix for % and & characters, fixes to properly handle double quotes and single quotes in setDataXML() function.

     * Version: 1.2.2 (10th July, 2008) - Added fix for % scaled dimensions, fixes in setDataXML() and setDataURL() functions

     * Version: 1.2.1 (21st December, 2007) - Added setting up transparent/opaque mode: setTransparent() function

     * Version: 1.2 (1st November, 2007) - Added FORM fixes for IE

     * Version: 1.1 (29th June, 2007) - Added Player detection, New conditional fixes for IE

     *

     * Morphed from SWFObject (http://blog.deconcept.com/swfobject/) under MIT License:

     * http://www.opensource.org/licenses/mit-license.php

     *

    Java Script Files. shall i use any other JS. is there any C# Handelers for server side printing and exporting?

    Thanks in Advance.

    V.U.M.Sastry Sagi