-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example with template and grouping #4
Comments
For grouping, see example 10 'group'=>array(
'caption'=>array(
'cat1'=>'Category 1',
'cat2'=>'Another category'
),
'rows'=>array(
'cat1'=>array(0),
'cat2'=>array(1,2)
),
'summary'=>array(
'cat1'=>array('product'=>'','price'=>23.99,'tax'=>12),
'cat2'=>array('product'=>'','price'=>5.45,'tax'=>5.75)
)
), In 'caption' array you specify which groups you want, in 'rows' you assign rows for each group and in 'summary' you give row for subtotals (you must calculate subtotals yourself) I hope this helps... |
Thanks for your prompt reply...I tested that example and worked perfect when not using template. I think that my issue is in how to create the template xls. |
Also what do you think about the subtotal or sum of one field of the group ? |
Unfortunately, you can't use groups with templates. I'll reopen the issue to see if that feature could be added in the future. Thanks |
I'm looking at the code and I see at render that you call generateReport() if it's using a template instead of createReport and inside that function @line 469 generateRepeatingRowsWithGrouping is called, buy the function name it seems that that's what I'm expecting. That function also uses $this->_group, but I do not understand how that funciton works or how to create the excel template so that the group is repeated, I'm missing something ? |
Hi!
First of all thanks for making and publishing this project.
I'm trying it and found difficult to make a template with grouping. Can you add an example ? Also is it possible to add functions on the summary ? Example: subtotal or sum of one field of the group ?
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: