Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
invoice from
Feng
Hello,
we have got the 2 books "Integrating and Extending BIRT" and "A Field Guide to Reporting". These are very goob books !!! But we don't know how to set a subtotal to our invoice form.
what we mean is for example on the first page, there is at the end of the page a subtotal of the values, on the second site at the top a subtotal of the first page and at the end a subtotal of the values on the first and second page. And so go on until last page, there should be a final total of the values.
Is this possible?
Thanks a lot
Best Regards
Feng Yu
Find more posts tagged with
Comments
mwilliams
Hi Feng Yu,
How is your report set up? Can you describe more what you're looking for? Are you wanting to subtotal groups? Or are you wanting something else?
Feng
for example:
page:1
company1
product1 10 ?
product2 20?
product3 15?
sum 45?
company2
product1 10 ?
product2 20?
product3 10?
sum 40?
at the end of the page: subtotal: 85?
page 2:
at the top of the page: subtotal: 85?
company1
product1 15 ?
product2 20?
product3 15?
sum 50?
company2
product1 20?
product2 20?
product3 10?
sum 50?
at the end of the page: subtotal: 185?
and so go on until last page that should be like this:
at the top of the page: subtotal: 185?
company1
product1 15 ?
product2 20?
product3 15?
sum 50?
company2
product1 20?
product2 20?
product3 10?
sum 50?
total: 285?
mwilliams
What version of BIRT are you using?
jimtonic
Greeting,
I have similar problem which is like Feng Yu's one, I am using BIRT_2_3_0 and Java 1.6
Page 1
A --> 1Pcs
B --> 2Pcs
C --> 3Pcs
....
....
....
sub-total: 6Pcs
Page 2
D --> 1Pcs
E --> 2Pcs
F --> 3Pcs
....
....
....
sub-total: 12Pcs
/* Page 1 + Page 2 = 12Pcs */
I am going to build a standalone application to generate a simple report. I think cross-tab is not applicable to my application since I don't have to group the elements.
How can I design it in Eclipse either (GUI) or Design Engine. I have "google" this topic and found a pagetotal.rptdesign
Any help and hints is welcome.
Thanks.
mwilliams
Hi jimtonic,
You could create an interval group that you have set to an interval that fits on each page. Then, each page would have a new header and footer. In these lines, you could then display your subtotal that you keep track of in a global variable of some sort. Hope this helps. Let me know if you have any questions.
jimtonic
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Hi jimtonic,<br />
<br />
You could create an interval group that you have set to an interval that fits on each page. Then, each page would have a new header and footer. In these lines, you could then display your subtotal that you keep track of in a global variable of some sort. Hope this helps. Let me know if you have any questions.</p></blockquote>
<br />
Hi mwilliams,<br />
<br />
Thanks for your hints. I am a new baby to BIRT.<br />
<br />
I wonder two things.<br />
<br />
1) how does the engine know I have to "store" the balance? Should there is an event called "onPageBreak", how can I make use of it when the item of a ResultSet reaches the end of a page or so on?<br />
<br />
2) In Script, how can I write script to insert a global variable to store the previous balance?<br />
<br />
Actually, I don't need grouping and I cannot group (nothing can be grouped in my application).<br />
<br />
Detail of my report are as follow:<br />
<br />
Page1<br />
Product_1 --> 3 Pcs<br />
Product_2 --> 4 Pcs<br />
Product_3 --> 5 Pcs<br />
....<br />
....<br />
....<br />
<br />
Subtotal = 12 Pcs<br />
// At the end of the page<br />
Page2<br />
<br />
Product_5 --> 6 Pcs<br />
Product_6 --> 6 Pcs<br />
Product_7 --> 6 Pcs<br />
<br />
Subtotal = 18 Pages<br />
// At the end of the page<br />
--> Final Page<br />
Product_A --> 1 Pcs<br />
Product_B --> 2 Pcs<br />
<br />
Total = 32 Pcs<br />
<br />
<br />
Still, any help and hint is appreciated and welcome.<br />
<br />
Thank you very much
jimtonic
<blockquote class='ipsBlockquote' data-author="jimtonic"><p>Hi mwilliams,<br />
<br />
Thanks for your hints. I am a new baby to BIRT.<br />
<br />
I wonder two things.<br />
<br />
1) how does the engine know I have to "store" the balance? Should there is an event called "onPageBreak", how can I make use of it when the item of a ResultSet reaches the end of a page or so on?<br />
<br />
2) In Script, how can I write script to insert a global variable to store the previous balance?<br />
<br />
Actually, I don't need grouping and I cannot group (nothing can be grouped in my application).<br />
<br />
Detail of my report are as follow:<br />
<br />
Page1<br />
Product_1 --> 3 Pcs<br />
Product_2 --> 4 Pcs<br />
Product_3 --> 5 Pcs<br />
....<br />
....<br />
....<br />
<br />
Subtotal = 12 Pcs<br />
// At the end of the page<br />
Page2<br />
<br />
Product_5 --> 6 Pcs<br />
Product_6 --> 6 Pcs<br />
Product_7 --> 6 Pcs<br />
<br />
Subtotal = 18 Pages<br />
// At the end of the page<br />
--> Final Page<br />
Product_A --> 1 Pcs<br />
Product_B --> 2 Pcs<br />
<br />
Total = 32 Pcs<br />
<br />
<br />
Still, any help and hint is appreciated and welcome.<br />
<br />
Thank you very much</p></blockquote>
<br />
<br />
<br />
Greeting,<br />
<br />
I have partially solved the problem.<br />
<br />
here is my steps,<br />
<br />
1) select "layout", right click table, insert a group.<br />
2) select the interval range [i.e. Set the interval for each group] !!!<br />
3) insert Total.sum(row["which_column_be_calculated"], null,"group_name") into "Expression Builder"<br />
<br />
<br />
Page Break<br />
Before:Auto<br />
After:Always<br />
Inside:Auto<br />
<br />
Workaround: Add an ID for the transaction and sort them.<br />
Set Interval Range for it, say X. <br />
That's all.<br />
<br />
<br />
May I say thank you for all hints and solutions.