ACCORD5
Add a reply

ACCORD5 Company Forums » Trellis Desk » Peer-to-Peer Support

Reg: Report generation

 
  • Started 10 months ago by prabu
  • 4 posts in this topic
  • Latest reply from emarcos01
  1. User has not uploaded an avatar

    prabu

    offline
    Member

    Hi Support team,

    I would like to generate a report (ticket status into excel or PDF file) from your "Trellis Desk" software. i have installed and working with it currently. Please help me on this. awaiting for your reply.

    Thanks
    Prabu

    Posted 10 months ago #
  2. emarcos01

    emarcos01

    offline
    Member

    Hi, for reference in your database for the columns Yourdatabasename.tickets.status =6 is for close tickets, 4 for ACA , 1 is not close.

    I do some reports outside from the trellis system with FusionCharts, For only the the status you can use this ( or only the SQL query for extract the info) :

    **Dont forget to put away the -*- for some SQL in the code

    <?php
    ///Graficas con Fusion Chart

    $con = mysql_connect("localhost","YOURDATABASENAME","YOURPASSWORD");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }

    mysql_select_db("YOURDABASENAME", $con);

    //$strXML va ser usada para guardar todo el documento XML generado/$strXML will be used to store the entire XML document generated
    //Generate the graph element
    $strXML2 = "<graph caption='Estatus de solicitudes' subCaption='Por estado actual' decimalPrecision='0' showNames='1' numberSuffix=' Solicitudes' formatNumberScale='0'>";

    //Fetch todas las solicitudes
    $strQuery =" Sel-*-ect ca-*-se when Ydatabasename.tickets.status =6 then 'Completadas' when Ydatabasename.tickets.status =4 then 'En espera de respuesta de usuario' when Ydatabasename.tickets.status =1 then 'Sin cerrar' end as status, count(case when Ydatabasename.tickets.status =6 then 'Finalizado' when Ydatabasename.tickets.status =4 then 'En espera' when Ydatabasename.tickets.status =1 then 'Sin cerrar' end ) as cstatus fromYdatabasename.tickets left joinYdatabasename.members onYdatabasename.tickets.amid=nykhdesk.nykhd_members.id group by status order by cstatus";
    $result = mysql_query($strQuery) or die(mysql_error());
    while($row = mysql_fetch_array($result))

    {
    $strXML2 .= "<set name='" .$row['status'] . "' value='" . $row['cstatus'] . "' />";
    }
    //limpias el set de SQL/ free the result set
    mysql_free_result($result);

    //Finalmente, cierras el elemento /Finally, close <graph> element
    $strXML2 .= "</graph>";

    //Cierras la conexión
    mysql_close($con);

    //Creas es grafico de columnas con los datos del $strXML /Create the chart - Pie 3D Chart with data from $strXML

    echo renderChart("Column3D.swf","", $strXML2, "Status", 600, 300);
    ?>

    **Don´t forget to add the files of fusion chart !

    Hope this help you.

    If you know more of PHP and know how to add in to the trellis system i will if you can share it.

    Best regards

    Posted 10 months ago #
  3. User has not uploaded an avatar

    andyb

    offline
    Member

    there's also this- but no option for pdf (although I have been looking to see how "easy" it would be)
    http://forums.accord5.com/topic/a-very-simple-statistics-module

    Posted 10 months ago #
  4. emarcos01

    emarcos01

    offline
    Member

    Andyb,
    I will recheck with your comments and try to implement.
    Digging into the web I found this a class for make the PDF http://ros.co.nz/pdf/readme.pdf
    Thanks for share the solution!
    :-)
    Best regards

    Posted 10 months ago #

RSS feed for this topic

Reply to this topic

You must log in to post.