Welcome! Log In Create A New Profile

Advanced

Reports Calculation

Posted by Denis Vaughan.pcs.crosspost 
Denis Vaughan.pcs.crosspost
Reports Calculation
September 12, 2008 09:53AM
Hi,

Can anyone assist. I have a report based on a grouped query with a calculated sum total in the query. The query works fine and the report runs against it. I need an additional calculation per row of the report. It is based on one field in the query less the calculated summary field. This can be added in the query and the query works but the report won't. So is it possible to add or subtract two controls on the row of a report and have a calculated control holding the answer ?



Message forwarded from pcsoft.us.windev
Paulo Oliveira
Re: Reports Calculation
September 12, 2008 10:44AM
Yes, you can.
You can put code in the report like in any window.
Piet van Zanten
Re: Reports Calculation
September 12, 2008 02:40PM
Hi Denis,

You don't need to include the calculation in the query. Just create a calcutaled control. In the code section "before printing" you add this code:
CALC_MyCalc=MySource.Field1-MySource.Field2
//or MySelf=MySource.Field1-MySource.Field2
With MySource.QueryItemName you can use any query item in code.

Best regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: