| Summary: | [Improve Page Aggregate capabilities] Add support for page aggregates / page totals | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mario Winterer <mario.winterer> | ||||||
| Component: | BIRT | Assignee: | Wei Yan <wyan> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | mindan xu <mindan.xu> | ||||||
| Severity: | enhancement | ||||||||
| Priority: | P2 | CC: | bluesoldier, chrishane, qwang, wenfeng.fwd, wlin, wyan, xwang, xxue, yli, zfei, zhlu | ||||||
| Version: | 2.2.0 | Keywords: | plan | ||||||
| Target Milestone: | 2.5.0 RC1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | Autoed,G | ||||||||
| Attachments: |
|
||||||||
|
Description
Mario Winterer
can we add three events in the master page:
1. onPageStart
The user can initialize the page aggregation variables.
After this event, the engine will create the page header.
2. onPageContent
For each content displayed in the page, the event will be triggered. In the event, the user need get the value from content and sum them together.
After this event, the engine will output the content into the page body.
3. onPageEnd
The user can finalize the page aggregation.
After this event, the engine creates the page footer.
Excuse me if I'm mis-reading your comment. It looks like you want to have page functions be some type of scriptable variables. If that is the way you implement it, that is fine - all I really want is access. However, I like how jasper reports has implemented similar functionality and created a "band" where any of the existing reporting functionality can be added (e.g., built in functions). It would be nice to be able to use the GUI to add a row to a table similar to grouping so that the GUI builder could be used and page totals/functions/labels/formating could be seen visually. However, that might be a longer term wish list item. (In reply to comment #2) > Excuse me if I'm mis-reading your comment. It looks like you want to have page > functions be some type of scriptable variables. If that is the way you > implement it, that is fine - all I really want is access. > However, I like how jasper reports has implemented similar functionality and > created a "band" where any of the existing reporting functionality can be added > (e.g., built in functions). It would be nice to be able to use the GUI to add > a row to a table similar to grouping so that the GUI builder could be used and > page totals/functions/labels/formating could be seen visually. > However, that might be a longer term wish list item. Please check out the master page header/footer feature in BIRT. You can put most of the report items and autoText there with visual labels, grids, and formatting. The enhancements seems to be adding access to the data in the page in the page header and footer.
> What I'm dreaming of:
> + page totals (e.g. number of employees on this page, and sum of their salary)
> + accumulated (group) aggregates / continous summation (e.g. number of
> employees so far, and sum of their salaries)
The main issue we need to address is how to specify above totals in the master page header and footer. Since some of the report pages might not have employee on it, for example if it is a master detail report where the first few pages are department/division numbers and follow by many pages of employee number.
How about adding a "pageTotals" function group (or scribtable object using implmentation terminologu) for data report items in the master page and footer? The syntax could be pageTotoal.count(table["ABCtable"].row["employee"]. or pageTotal.sum(table["ABCtable"].row["salary"]). If ABCTable doesn't appear in this page, it will be evaulated to 0.
For the accumulated totals, we can add another function groups as "pageRunningTotals", similar syntax, except the calculation will be accumulated totals upto the current page.
please let us know if such solution would be sufficiently easy to use.
defer to RC1 due to resource limitation. Fixed. Create a new page scripting framework which support user added page aggreations: 1. define page variables/report variables in the report, the report variable is saved only once while the page varabile are saved for each page. 2. define onPageStart/onPageEnd in the report and master pages. 3. define onPageBreak in the report element. 4. support the auto-text to access the page varaible and report varaible. 5. add the API to access the page varaile through the page scripts. Created attachment 135927 [details]
sample to display the first and last element in the page header
Created attachment 135928 [details]
sample to use seperate page number in each group
*** Bug 165399 has been marked as a duplicate of this bug. *** *** Bug 197185 has been marked as a duplicate of this bug. *** *** Bug 212837 has been marked as a duplicate of this bug. *** *** Bug 213969 has been marked as a duplicate of this bug. *** Mark as verified first, some bugs occur in the testing progress and i'v opened new entries. Build <2.5.0.v20090518-0630> |