Yii Framework Forum: Yii with generating and printing reports, charts etc. - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Yii with generating and printing reports, charts etc. experience with generating and printing data with Yii Rate Topic: ***** 3 Votes

#1 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 14 January 2010 - 06:19 PM

I have not seen any relevant summarizing article in forum or cookbook about extensions or methods about generating reports, charts etc.(e.g. from models, xml or other provided data) and preparing them to be printed.


In this article please specify your experience (extensions, your own code, print button realization, etc.) in all above mentioned when generating user relevant data (reports, charts) from models, and/or preparing them for printing.


This list will be updated after your comments:


Charting with Yii:
1. Yii Open Flash Chart 2 Extension [feedback: very nice implementation and authors contribution - examples of using data from external sources(model, xml schema, etc.) would be greatly valuable]
2. Fusion Charts API Extension - Create and share Charts
3. Flot - EFlot plotting library encapsulation
4. Jqplot - extension of jqplot for charts
5. Cvisualizewidget - This widget makes it easy to render charts and graphs within your web application by utilising the visualize jQuery plugin.
6. Highcharts Extension
7. ...

Printing, generating pdf, xls, cvs etc. with Yii:
1. Generating PDF with - tcpdf needs to be rechecked as it does not work properly...
2. Simple Yii extension printout for .datagrid and other .css elements printing - please offer your favourite extension usage methods
3. Yii CSV generator csvout See installation issues
4. Generating PDF with pdflib see topic
5. phpexcel-codeplex by sharehua
6. Print what you see - mprint by macinville
7. ...

Relevant topic here

Additional data generation, aggregation, grouping extensions and methods:
1. ...

Please offer your solutions and specify additional categories relevant to this topic.

All your contribution to this topic should be put in cookbook

This post has been edited by CoLT: 18 March 2011 - 04:17 PM

3

#2 User is offline   gallego123 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 535
  • Joined: 11-August 09
  • Location:Argentina

Posted 15 January 2010 - 05:29 AM

i modify CVSOUT and generate excel with PHPExcel. but only did that

I am interested in the topic

Grouping, Paging, headers, footers ...

here more links http://phpreports.sourceforge.net/
http://agata.codigol...rg.br/index.php
KISS - Keep It Simple Stupid
ASAP-As Soon As Possible
http://www.yiiframew...oc/cookbook/71/
0

#3 User is offline   cmx 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 21-November 09
  • Location:California USA

Posted 15 January 2010 - 06:30 AM

This is an old one originally released for PHP3 around 2000 and updated over the years.

Quote

PHPLOT is a graph library for dynamic scientific, business, and stock-market charts. Written in PHP; requires PHP5 and GD. (Pre-2008 versions work with PHP4 too.) Optionally uses TrueType (TTF) fonts. Includes Pie, Bar, Line, Area, Point and other plot types.


http://sourceforge.n...rojects/phplot/
0

#4 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 15 January 2010 - 06:55 AM

View PostHoracio Segura, on 15 January 2010 - 05:29 AM, said:

i modify CVSOUT and generate excel with PHPExcel. but only did that

I am interested in the topic

Grouping, Paging, headers, footers ...

here more links http://phpreports.sourceforge.net/
http://agata.codigol...rg.br/index.php


That's very good modification. Could you put it somewhere to be downloadable for other members?
0

#5 User is offline   gallego123 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 535
  • Joined: 11-August 09
  • Location:Argentina

Posted 18 January 2010 - 07:14 AM

View PostColt, on 15 January 2010 - 06:55 AM, said:

That's very good modification. Could you put it somewhere to be downloadable for other members?


yes, of course
but i'm new in php and yii.

probably will have to be modify the code for create a good extension for all members

help me please
KISS - Keep It Simple Stupid
ASAP-As Soon As Possible
http://www.yiiframew...oc/cookbook/71/
0

#6 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 18 January 2010 - 07:44 AM

View PostHoracio Segura, on 18 January 2010 - 07:14 AM, said:

yes, of course
but i'm new in php and yii.

probably will have to be modify the code for create a good extension for all members

help me please

Thanks!

Seems the attachment file is broken - could not extract.
0

#7 User is offline   gallego123 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 535
  • Joined: 11-August 09
  • Location:Argentina

Posted 18 January 2010 - 08:31 AM

View PostColt, on 18 January 2010 - 07:44 AM, said:

Thanks!

Seems the attachment file is broken - could not extract.


I do not know what is happening.
bug in forum?
I can not attach tar.gz

try with zip file

[edit]
you must download PHPExcel an d put in extension folder

Attached File(s)

  • Attached File  xls.zip (7.38K)
    Number of downloads: 137

This post has been edited by Horacio Segura: 18 January 2010 - 09:32 AM

KISS - Keep It Simple Stupid
ASAP-As Soon As Possible
http://www.yiiframew...oc/cookbook/71/
0

#8 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 24 April 2010 - 06:30 AM

Hey all,

What news do you have in this topic?

I saw new extension up rise here Fusion Charts API ext - Create and share Charts

Best regards,
CoLT
0

#9 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 05 May 2010 - 10:53 AM

New extension for Yii - Flot:
http://www.yiiframew...extension/flot/

This extension encapsulates the jQuery flot graph library see flot
Samples here

Best regards,
CoLT
0

#10 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 17 June 2010 - 10:12 AM

Added two new charting extensions:


Best regards,
CoLT
0

#11 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 29 August 2010 - 01:27 PM

One new extension coming up to Excel :)

http://www.yiiframew...excel-codeplex/

phpexcel-codeplex port by sharehua
http://www.codeplex.com/PHPExcel

Greetings,
CoLT
0

#12 User is offline   gallego123 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 535
  • Joined: 11-August 09
  • Location:Argentina

Posted 30 August 2010 - 05:15 AM

Good job CoLT

thanks
KISS - Keep It Simple Stupid
ASAP-As Soon As Possible
http://www.yiiframew...oc/cookbook/71/
0

#13 User is offline   Milo Schuman 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 17-September 10

Posted 11 October 2010 - 09:50 AM

CoLT, great topic. Here is another new extension you may want to add to the list.

Highcharts Extension

Compared to the other JavaScript charting libraries (Flot, jqPlot), Highcharts requires a more verbose configuration but also produces higher quality (animated) graphs, supports more advanced options without plugins, and uses only a single JavaScript file.
0

#14 User is offline   AndreMax 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 24-February 11
  • Location:Indonesia,Medan

Posted 07 March 2011 - 09:38 PM

Hi All,
Today I found something that make my day :)
please find mpdf at MPDF

Hope make our lives got better.
If you think this info is usefull please GRP (are there any ?) :rolleyes:
0

#15 User is offline   RedRabbit 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 183
  • Joined: 24-September 10

Posted 08 March 2011 - 03:52 AM

I'm currently doing a project which requires generating graphic reports for printing, so I decided to generate PDFs to allow people easy printing.

For this I've downloaded TCPDF and am experimenting with it. I didn't like the existing Yii extension for it, so I wrote my own to encapsulate TCPDF as an application component, and it's working so far. I'll upload it when I've finished if people are interested.
Rupert
0

#16 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 09 March 2011 - 01:50 AM

View PostRedRabbit, on 08 March 2011 - 03:52 AM, said:

I'm currently doing a project which requires generating graphic reports for printing, so I decided to generate PDFs to allow people easy printing.

For this I've downloaded TCPDF and am experimenting with it. I didn't like the existing Yii extension for it, so I wrote my own to encapsulate TCPDF as an application component, and it's working so far. I'll upload it when I've finished if people are interested.


Of course, its great to have full community impact in the Yii's growing extension library!

Greets,
CoLT
0

#17 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 18 March 2011 - 04:15 PM

One more goes for Printing ;) mprint

Greetings,
CoLT
0

#18 User is offline   smackYYZ 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 14-April 11
  • Location:Toronto

Posted 14 April 2011 - 03:34 PM

Here is an open source library which I think would be a great graphing library once wrapped into an extension.

website: dygraphs dot com or the source is here https github dot com/danvk/dygraphs
I have no idea yet on how to make it into an exension yet, but thought I would throw it out there, since I did not see anyone mention it.

Mike
0

#19 User is offline   RedRabbit 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 183
  • Joined: 24-September 10

Posted 11 May 2011 - 10:00 AM

Ok, I've finished my project involving generating Pdf reports, so as promised, here is what I used - Attached File  RRTCPdf.zip (3.87K)
Number of downloads: 170.

I've basically just made a wrapper to transform TCPdf into a Yii component with autoloading goodness.
There is a component class file which allows you to set options and paths in your main.php config file, and an example TCPDF class extension file that you can use, or replace with your own custom one (at the very least you'll want to modify/extend it to implement your own page headers and footers).

My experience with TCPdf is that it is a beast. Most of the code is in a >1Mb class file, and depending on what you're doing, generating Pdf files can be slow (although in my case it wasn't too bad - I didn't have much content per document).

I didn't make much use of the Html conversion functions (although the whole class seems to be geared to Html conversion anyway), but from what I've read, using big chunks of Html as source can make things quite slow.

All in all, TCPdf is obviously very useful - it is quite powerful, and of course it is free!
However, while I'm certain that a lot of clever code has gone into it, I didn't think much to the coding. Coding standards are not too good, and the whole thing is not very readable. I found myself adding getters in my extension class, because there were a lot of setters that had no counterpart getter (which you'll need, for example, if you want to change margin sizes for something in particular, and then reset them back to what they were, without having to hard-code those sizes).

I think the whole thing could do with rewriting the Yii way (not necessarily for inclusion in Yii, just because it is so much clearer and cleaner). Proper use of getters and setters would be good, and using arrays to pass options into functions a la Yii (rather than some very long lines of mostly optional parameters) would be great. I'm also sure that there must be some way of compartmentalizing in places, so that the one massive class could be split into several files and classes that are only loaded if needed - maybe if I had a spare year I could go for it! :P

Anyway, there is my experience on the thing - I hope it's useful to someone.
Rupert
2

#20 User is offline   itmagetan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 90
  • Joined: 25-February 11

Posted 21 May 2011 - 07:28 AM

Hi .. I am currently working on a project and need a print feature but I can not find extensions that able print the data model (all pages). Current extensions are now only can print the displayed page only. How can I do that?
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users