Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report won't preview
Message
From
01/07/1999 15:57:07
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00236534
Message ID:
00236666
Views:
19
>>Hi,
>>
>>I've encountered a problem in trying to print a report from within a form. I've done this a million times and can't understand what would cause this problem.
>>
>>The command is: Report Form Errrept Preview
>>
>>Simple, huh? It executes just fine from the Command Window. It's counterpart to this routine (Report Form Errrept to Printer NoConsole) executes perfectly.
>>
>>I believe it has something to do with the form properties. The properties that could affect this situation are: Alwaysontop = .T. (Which I set to .F. before executing the Report Form instruction), and ShowWindow as Top Level Form . I believe it has to do with the ShowWindow property, however, if I don't leave it as a Top Level Form, when my form is called, it appears behind the calling form. How can I get around this without altering the ShowWindow property (if that is in fact my problem)?
>>
>>Any assistance would be greatly appreciated.
>>
>>TIA
>>
>Hi Barry,
>
>As Jim mentioned unless you provide a window (form) for the preview, it won't work because the default is in _SCREEN and it's not visible with this.
>
>What I did was to subclass a form for this purpose, setting it as a top-level form. Then to print the report:
>SET CLASSLIB TO SDIClass ADDITIVE
>oPreviewFrm = CREATEOBJECT("PreviewForm")
>RELEASE CLASSLIB SDIClass
>REPORT FORM (report file) ENVIRONMENT NOCONSOLE PREVIEW IN WINDOW (oPreviewFrm.Name)
>hth,


Thanks for you response George (and Jim and Evan). I did what you suggested and it still doesn't preview the form. (Incidentally, the syntax IN is not valid in the IN WINDOW statement). I also tried an Activate window Previewform in window myformname. It activated the Previewform, but still didn't display the report.

If you have any more suggestions I'd really appreciate them. I'm pulling my hair out on what seems to be a simple problem.

Thanks Again,

Barry
If at first you don't succeed......SET STEP ON!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform