Friday, April 12, 2013

Conditional Sub-Total on Report

Most of Foxite forum members are aware that I have been blogging in Weblogs way before I decided to blog here in blogspot.  However, I have a lot of new visitors here who might not be aware of that so I decided to repost this knowing it may also help others.

This trick is on removing sub-total when there is only one item on native VFP report.  Take a look at the image I grabbed from said Weblogs posting below:



The trick lies with a variable.  Create a variable, name it to whatever you like (mine is overall), with the following settings:

value to store = 0
initial value = 0

reset value based on a group

calculation type = count
then of course, tick the release after report checkbox.
Now, on anything that is in the group footer, double-click, click print when tab, tick remove if blank checkbox, then place this condition on print only when expression is true textbox: overall > 1
and that is it.  enjoy your report with conditional sub-total printing!

Cheers!