Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Print When Logic and report variables
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Problem with Print When Logic and report variables
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01248344
Message ID:
01248344
Views:
76
Hi everybody,

Would anyone please confirm if this bug exists in VFP9 as well as in VFP8?

1. Create a report with one group and a Summary. Check Re-print group Header on each page.

2. Put total fields into group footer and in the summary.

3. Create report variable nGroups, set calculations to Sum, value to 0.

4. In Groups Footer OnExit put
_VFP.SetVar('nGroups', m.nGroups + 1)
5. Add nGroups into the Summary section. For the rest of the fields put Print When expression

m.nGroups > 1

Run the report for the table with two different groups.

Would Total fields print for you?
----------------------------------------------------------------------------

I can provide a report and a table to run this report if someone wants them.

Thanks in advance.

Interestingly that IIF(m.nGroups > 1, 'Report Total', '') the 'Report Total' prints. But Print when logic doesn't work.

I now remember I saw something along these lines in Cathy's book...


My final solution was to use nGroups > 0 instead of nGroups > 1. The other solution would be to use IIF expressions, but then I would have to add variables for Total amounts...
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform