Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preview not allowing Preview!
Message
From
17/08/1999 09:30:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Preview not allowing Preview!
Miscellaneous
Thread ID:
00254485
Message ID:
00254485
Views:
66
Have had to write an automated routine to print off 3 (or 4) reports one after the other to get around the problem of multipage reports. (So it prints the report which is the equivalent of page 1, then the report for page 2 etc)

I also give the user the option to preview each page prior to printing it (and to avoid printing if appropriate).

This works fine if I'm only printing the first three reports/pages. The preview comes up, they inspect it and decide whether or not to print it, then move on to the next report/page.

The fourth report/page, however, can only be printed if they first opt to run an analysis program that sets up the 100 or so variables which the report is based on.

But, if we run the analysis, all four reports still print, but now they refuse to stop for the preview!

I have a similar problem when editing the fourth report alone. If I preview it, the screen flashes and returns to the edit screen instantly.

None of the variables in the report have even the remotest connection to the vfp environment (they're all about predicting how many frames an optician can sell in their locality based on demographic and other data).

The code that runs the reports is pretty simple:

noanalysis=.f.
if type('TotalFrameSales')='U'
=messagebox('In order to include the Demographic Analysis and Display Recommendations'+chr(13);
+'You need to run the Analysis Program by clicking on the Button on the'+chr(13);
+'"Potential" page of this form. Note: This applies even if the data is'+chr(13);
+'visible on the "Potential Page"',64,'Including Demographic Based Recommendations')

noanalysis=.t.
endif

Tmpref=market.Accref

action=messagebox('Confirm you wish to Print the Marketing Reports for this Client',35,'Print Reports Confirmation')
if action<>6
return
endif
report form m_first preview in screen for Accref=Tmpref
report form m_custom preview in screen for Accref=Tmpref
report form m_target preview in screen for Accref=Tmpref
if not noanalysis
report form recommend preview in screen for Accref=tmpref
endif
=messagebox('Printing Complete',0)
return

Anyone got any ideas why, when the relevant variables are in memory, the preview no longer allows a preview?

Harry
Next
Reply
Map
View

Click here to load this message in the networking platform