Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Print When Logic and report variables
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01248344
Message ID:
01248504
Views:
38
This message has been marked as the solution to the initial question of the thread.
Yes it is a bug and I have been complaining about this bug to MSFT for quite some time. Values of variables .. and positions of record pointers .. are not always the same at the point the print when logic is evaluated compared to the point when the objects are printing. The code that evalutes the Print When logic is clearly in the wrong spot in the Report Engine .. but MSFT hasn't been listening to me on this one and keeps refusing to do anything about it!!

I submitted another bug report with this example to Microsoft Connect. The bug number is 293615. Please feel free to add your feedback to the bug. Maybe if enough of us scream about this they will do something!



>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...
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform