Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: How to Export ccc2 charts to PDFs in cdf

  1. #1

    Default How to Export ccc2 charts to PDFs in cdf

    Hi,

    how to export ccc2 charts to pdf in cdf dashboard .please can you help on this.



    Thanks,

    Savan.

  2. #2
    Join Date
    Dec 2012
    Posts
    121

    Default

    At now, the only way is to use the report designer.

    See http://www.ambientbi.co.uk/?p=357 or google it on the web.

    There is also a post on pedro alves blog.

    Yamas,
    marco

  3. #3
    Join Date
    Dec 2012
    Posts
    121

  4. #4

    Default 'Export to PDF' button on CDF dashboard

    Hello,

    this is a 2 months old topic and now i have the same problem here described. Thank you marcolino for the links you posted, but they are all related to CDE editor (even that one with CDF on its url path) as all the methods described on them rely on the "SHIFT + G" keyboard shortcut.

    The point here is to call CGG from CDF dashboard it self.

    I tried to dig into the code which creates the "SHIFT + G" dialog, but i am getting lost.

    Do any know how to achieve this? How to call the CGG functions from JavaScript?

    Regards.

  5. #5
    Join Date
    Nov 2011
    Posts
    1,229

    Default

    You call CGG from javascript invoking an url. The url specifies which chart definition (javascript file) CGG will use to render the image.

    A CGG chart definition example can be easily obtained using the shift+G in CDE - this creates a js file for each chart you wish to export.
    That's the best starting point.

    You can also check the CDE dialchart component - it's a CGG component - the js file is somewhere in system/pentaho-cdf-dd
    Pedro Vale
    --
    CTools Product Development
    http://www.webdetails.pt

  6. #6

    Default

    Hello again pamval,

    so the CGG libraries are capable of rendering CCC2 charts by calling a service on: http://youServerIP/pentaho/content/cgg/draw?script=scriptName.js

    Calling this service is just making a request to the server. It takes a js file as a param (where the chart is defined) and it gives you back the rendered image. So far so good.

    problem: I can't generate this fancy js script on CDE because i am not using CDE. I am creating dashboards using CDF.

    Reached this point i have 2 questions:

    > Is it possible to generate this javascript using CDF?
    > Once you have created this javascript files are they automatically updated? i explain mysef:
    I have a dashboard with a chart obtaining its data from a DB.
    I create a js file for this chart using 'SHIFT+G'.
    Now the DB gets changed.
    After that: I render the dashboard and the chart is going to be updated as it is retrieving the last data on DB.
    After that: If I render the chart using ...cgg/draw?script=scriptName.js is the image going to be updated with the last changes on DB? note that i have not created a new js file using 'SHIFT+G'.


    Ps. I really appreciate your help, i hope you not to become tired of my impertinent questions. :D If you are interested on my context here it is:
    my boss wants a dashboard with a very big round red button wich after being pressed gets the dashboard saved as PDF while the 'Negra Sombra' gets reproduced on the speakers. No problem on the music thing... the pdf is another battle. Thank you very much again.

  7. #7
    Join Date
    Nov 2011
    Posts
    1,229

    Default

    I was suggesting that you use CDE to generate the script in order to get an example of what the script looks like. After you have that example, it should be really easy to understand what you need to do to build your own script for the CDF charts.

    No, you can't generate the javascript using CDF.

    Yes, when you call that url, the chart will execute again, meaning it will execute the query and render itself, reflecting the changes on the DB.

    I'm a bit afraid to know more about your context :-D. It sounds weird....
    Pedro Vale
    --
    CTools Product Development
    http://www.webdetails.pt

  8. #8

    Default

    thanks again,

    i'll take a look to the js generated from CDE in edition mode. I am not sure if creating this 'definiton chart js' on my own will be worthy; maybe i am using some javascript to just make a screenshot of the dashboard and save it as pdf.

    hahaha it sounds sad indeed. ;D bb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.