Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show subtotals in datareport ???

Status
Not open for further replies.

melbe

Programmer
Apr 28, 2003
6
MX
Hi !!

In troubles again...

I had a report (made with DataReport) with one header and details bands, but when i visualize this report i need to place subtotals in every page.

Is it possible ??
Does anybody can help me ??

Thanks !!!

Melissa



 
Subtoals in every page? Subtotals of a certain grouping? I'm not sure I follow.

--
Jonathan
 
Hi !

I want subtotals in every page, because this is a financial report.

For example...
I need something like this:
Name pay tax total
John --- 5,000 ---- 198.40 ---- 5,198.40
Chris --- 5,000 ---- 98.40 ---- 5,098.40
...
Mary --- 5,000 ---- 100.00 ---- 5,100.40
___________
subtotal: $?,???.??
page1

Name pay tax total
Mel --- 5,000 ---- 198.40 ---- 5,198.40
Harry --- 5,000 ---- 98.40 ---- 5,098.40
...
Peter --- 5,000 ---- 100.00 ---- 5,100.40
___________
subtotal: $?,???.??
page2
...

:D
 
Well... Microsoft Data Reports are great for real basic reports, but they're not worth much after that... I think having page footer summations is a little more complex than a Data Report can handle.

You might be able to manage something like this at run time, although I'm not sure (you can't do it at design time). I'm going to tinker with this idea tonight and/or tomorrow to see if I can wing something.

Hopefully someone will correct me on this issue if I'm wrong.

Good luck!

--
Jonathan
 
Hi Melissa, I have the same problem, I need to calculate subtotals in every page footer ... can you solved it ?
Thanks a lot
Fabiana
 
There is a very good report designer tutorial at:

All on one line.

Also, if you use GOOGLE and key in Report Designer Tutorial uou will get about 96,000 hits. One of those, I am sure, will deal with summaries by group. i think a page is categorized a group in this instance. There is, I think, a group header/footer combination.

Good luck,

Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@earthlink.net
 
Thanks Robert, but I´m programming in Visual basic 6, and I can´t use an external program to generate the reports, so I´m using the DataReport control. The problem is that the records I must print there are not grouped by anything (except by the number of the page), I only need to list them and generate a total in each page.
Thanks a lot again
Fabiana (from argentina)
 
Thanks Robert, I will try the link, and let you know, but I have already searched a lot in the web, and I´m afraid is not possible to make what I need, at least in a simple and direct way. I will go on searching.
Fabiana
 
Yes, I´ve found the solution.
You must work with DataEnvironment, and you must know the number of records you will display in the DataReport, and the number of records you will display in each page.

You must create a new field in a table, for example: PageNumber, and you must save in each record, the number of the page:

NumberPage = int(rs.recordcount / RecordsPerPage) + 1

Then you must group by NumberPage, and you will be able to obtain the subtotals for each page.
If it is not clear, let me know.
 
Fabianag Thanx for the reply

But i feel its a complicated one. Is there no way where in u can have a computed column like in Power Builder reports.

I will give it a try & come back to you.

Once again thanx for the same

giyer555
 
What I find fascinating about Visual Basic is there is usually at least one way to do something. In most cases there is more than one way. Even in those cases where only one way is available, there are multiple ways to work with that one specific way.

If you are not happy with the answer given to you, build another way. If no other way can be found, build a better method.


Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@earthlink.net
 
Thanks everybody for your advices...
i'm still trying to find a solution.
I'll tell you if it's something new,

Melbe
(from Mexico)
 
Thanx thornmastr for the coollink

How to use RptFunction control & get subtotals? If u can help with some coding it will be better.

For example...
I need something like this:
Name pay tax total
John --- 5,000 ---- 198.40 ---- 5,198.40
Chris --- 5,000 ---- 98.40 ---- 5,098.40
...
Mary --- 5,000 ---- 100.00 ---- 5,100.40
___________
subtotal: $?,???.??
page1

Name pay tax total
Mel --- 5,000 ---- 198.40 ---- 5,198.40
Harry --- 5,000 ---- 98.40 ---- 5,098.40
...
Peter --- 5,000 ---- 100.00 ---- 5,100.40
___________
subtotal: $?,???.??

Thanx in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top