On 7/1/2015 1:11 PM, Joe Yoder wrote:
I am trying to add header and detail bands inside a Report Summary band to
handle data in three cursors.  Is there a way to do this?  Another way to
get the cursor data onto the report?

I'm not sure the following addresses your need (I wasn't reading the earlier messages very close, sorry).

If you just need some "single" calculations done note that you can reference any variable that is "in scope" when the report command is invoked. For example:

m.mystuff = "crazyworld"
SUM <whatever field> to nSpecialCount

REPORT FORM myFunStuff TO PRINTER PROMPT NOCONSOLE
*-- inside the report form myFunStuff.frx, you could put fields that have "m.mystuff" and "m.nSpecialCount" as the source. You could put them in the header, detail band, footer, wherever.

Thus, if you have a cursor created for your report just the way you want it. And you wanted to SUM the values and put them somewhere in the report, you do this: *-- Assumption: MyReportCursor is the cursor that has all the data you want, and nVal1, nVal2, .... nVal5 are fields in the cursor that you want to sum up...
*-- the sequence would be something like the following:

SELECT SUM(nval1) as nsum1, sum(nval2) as nsum2, sum(nval3) as nsum3, ;
        sum(nval4) as nsum4, sum(nval5) as nsum5) ;
    FROM MyReportCursor into ARRAY _aReportSums

REPORT FORM myFunStuff TO PRINTER PROMPT NOCONSOLE
*-- Note: those PROMPT, NOCONSOLE clauses are just what I use - it could be whatever you use
*-- anywhere in the report you could have fields that have _aReportSums[1],
*--        _aReportSums[2], .... _aReportSums[5] as the source

You can really get creative here. For example, if you have data in other tables or even global objects, you can plop them into the report. I will often do a bunch of SCATTER MEMO oSomething before I do a REPORT FORM command and I'll have oSomething.<fieldblahblah>, etc where I need it .

All the above said, using Report variables that are generated in the REPORT FORM itself works fine as well. But I thought I'd offer this up as a consideration.

HTH
-Charlie

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to