GRAFUG Meeting September 8, 2007

General Information

Nice size group for our first meeting.  Welcome back everyone!


Microsoft VFP 9.0 Service Pack 2 and Sedna beta has been released to download.

SW Fox will be held in October 18-21, 2007 in Arizona.  Registration ends soon, so book now!!  Remember, the user group gets a donation for every person who attends.  Latest bonus is 6 months free of FoxExpress to attendees.  (or ˝ off for existing customers of FoxExpress.)

Cool tool:  Slickrun free download, it is much like a cprompt you can launch things and run batch files.  For instance, Type in ‘morning’ and has it set to launch outlook, etc.

Main Presentation

This month Cathy Pountney gave a presentation on the report listener.  

 A few nuggets  from the meeting:

With the new report listener, you can issue your report form commands just like you did before.

However, there are object types:

Type value 0=print, 1=preview, 4=xml, 5=html

The command turns into report form xyz object type 1

Instead of report form xyz preview


cancelReport – this is not called if the user cancels and you can run it, this runs if you want to call the method and cancel the report for a reason you arranged.  It finishes what page it is on, then the code in the cancelReport will run, then sys(2024) is updated, then the afterreport is run.


Inside of the listener there is a property called twoPassProcess, if you need to do _pagetotal you set this property to true.  Use the property CurrentPass that tells you which pass you were on so you don’t accidentally manipulate the data twice. But it doesn’t tell you if it’s one or two pass with numbers.  If TwoPassProcess is false, currentpass is 0.  If it is true, the first process is 0, it is true the second pass is 1.  But if you are trying to manipulate figures, you can’t just check for 1 if you have twoPassProcess set to false.


Tricks with chaining reports:

_pagetotal only reflects the reports processed so far.

If report 1 has two pages and report 3 has five pages

So instead of Report showing 1 of 5 from the beginning, it will only think the first report has two pages until it starts the second report.

So it will show 1 of 2, 2 of 2, 3 of 5, 4 of 5…


Render method gets fired for every object on you report.  You have total control over where the object renders.  So in checks when you need to render the same object twice, you render it once, change the top, render it again lower in the report to have your duplicate stub, etc.


AdjustObjectsize allows you to change the shape or picture size before the render methods is called.  Maxheightavailable tells you how much room is left on your page.  So you can check this then change the height and width properties to adjust.  You can also use it for forcing page breaks by creating dummy shapes that checks the maxheightavailable and modified the height and width so the render assumes it needs a new page.  If you change the height and width property, you have to set the reload property to true so the engine will know you have to redraw it.  If the object is in a fixed height band it will not call this method.  If the object is stretched between the header and footer band, MS won’t let you do it.  You can’t make the height smaller than defined; only taller…so set it to the minimum height you want it, then grow it if you need it taller.  Width doesn’t force you to only make it wider.


EvaluateContents lets you change the font information.  This is run just before the report engine renders the expression.  Long description you can have squished into a smaller font by checking the room and making the font smaller until it fits.


In service pack two, they introduced property callAdjustObjectSize and CallEvaluateContents that determine when the object is called because they don’t want certain things to always call those methods and make it take forever.  Set to 0 will run code if exists, 1 never runs the code, 2 always occurs even if no code exists.  (example: if you have bindevents)  Always treated it as a 0 set before sp2.

For more information, come here Cathy speak at SW Fox!!!

Next Meeting

Our Next Meeting is October 13, 2007 and the planned speaker is Cathy Pountney, 10am-12pm.  I look forward to seeing all of you again.

Be a Volunteer

 If you wish to volunteer to be a speaker for a future meeting, information and a link for topic submission can be found on our website:



Sharon Hodgson

GRAFUG Secretary