Help Needed with equations in Reports 
Author Message
 Help Needed with equations in Reports

I am quite new to Clarion. I'm using Version 2.002 for windows.
I have 2 variables in a Report BREAK: eg: A and B.
I have another Variable(not placed on the report) that gets worked out in
the 'Preparing to process the window' embed : eg X.

A is getting summed in the BREAK's Footer. I need B(which is a local
variable) to be the result of the following equation : B=X-A    where A is
the sum of the detail field.

This sounds simple enough, except that I cannot find an EMBED that alows me
to do calculations on a BREAK level(all seem to be geared toward DETAIL
level) and using a FORMULA doesn't work either since none of the available
classes get processed as the Break footer is about to print.

Any help will be much appreciated.

Thanks in advance.
--
Craig Bryden



Sun, 19 Sep 1999 03:00:00 GMT  
 Help Needed with equations in Reports

Quote:

>I am quite new to Clarion. I'm using Version 2.002 for windows.
>I have 2 variables in a Report BREAK: eg: A and B.
>I have another Variable(not placed on the report) that gets worked out in
>the 'Preparing to process the window' embed : eg X.
>A is getting summed in the BREAK's Footer. I need B(which is a local
>variable) to be the result of the following equation : B=X-A    where A is
>the sum of the detail field.
>This sounds simple enough, except that I cannot find an EMBED that alows me
>to do calculations on a BREAK level(all seem to be geared toward DETAIL
>level) and using a FORMULA doesn't work either since none of the available
>classes get processed as the Break footer is about to print.
>Any help will be much appreciated.

Easiest thing to do is to put your code in the "Before printing
detail" (b=x-a) embed point.  So B is calculated for every record
printed, but only prints when the footer is actually required.  If you
absolutely hate to have code executed that will actually not be used
you will have to manually keep track of when the break happens (e.g.
if bre:var <> lastbreak) and keep you own sum of the field you are
totalling on to do your calculations.
----------------------
Jon Waterhouse
Andy Rowe Consultants,
St. John's NF


Sun, 19 Sep 1999 03:00:00 GMT  
 Help Needed with equations in Reports

G'day Craig!

Quote:

>This sounds simple enough, except that I cannot find an EMBED that alows me
>to do calculations on a BREAK level(all seem to be geared toward DETAIL
>level) and using a FORMULA doesn't work either since none of the available
>classes get processed as the Break footer is about to print.

Just keep on doing the calc in the Printing Detail embed points. I
usually use the After for doing calcs, totals etc for the footers.
When the Break Footer rolls around the calculation is already done,
and the print engine will print out the correct value.

I agree, in principle, that embeds for group breaks might be nice, but
with nested group breaks could be messy. The template set would have
to generate #EMBEDs for each group header and footer. The Detail embed
point acts like a nice catch-all, and can be used with confidence.

HTH
--
Steve Greenwood
HiCaliber Software



Sun, 19 Sep 1999 03:00:00 GMT  
 Help Needed with equations in Reports

There is no embed to do that, it is a real bummer!!

You can do it by calculating your totals in variables and performing your calculation in
the embed for 'Before Printing Detail'.  If you find a better way, let me know!


Quote:
>I am quite new to Clarion. I'm using Version 2.002 for windows.
>I have 2 variables in a Report BREAK: eg: A and B.
>I have another Variable(not placed on the report) that gets worked out in
>the 'Preparing to process the window' embed : eg X.

>A is getting summed in the BREAK's Footer. I need B(which is a local
>variable) to be the result of the following equation : B=X-A    where A is
>the sum of the detail field.

>This sounds simple enough, except that I cannot find an EMBED that alows me
>to do calculations on a BREAK level(all seem to be geared toward DETAIL
>level) and using a FORMULA doesn't work either since none of the available
>classes get processed as the Break footer is about to print.

>Any help will be much appreciated.

>Thanks in advance.
>--
>Craig Bryden


    Geoff Bomford
     ComForMark
  Sydney, Australia


Mon, 20 Sep 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. linear equations-we need help

2. need help to solve 2D poisson equation using Fortran

3. Math help needed - Warning complex equation!!....read only if brain is in stable conditon

4. Need Finite Element Code to Solve Laplace's Equation

5. need help integrating with Crystal Reports via OLE

6. Clarion EE5b Report Help Needed!

7. cw 2.0003, filter box on report properties is too small, need help...mucho

8. C5b Report Help Needed!!!!

9. Need Help with Contract \ Form letter \ report

10. Need help with single record report

11. c5ee: need to report bugs to Topspeed - please help

12. Need Help Saving a Report Before Printing

 

 
Powered by phpBB® Forum Software