Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report preview on form
Message
 
 
To
29/06/2010 10:18:05
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01470938
Message ID:
01470943
Views:
131
This message has been marked as the solution to the initial question of the thread.
Check http://www.spacefold.com/colin/archive/articles/reportpreview/techniques.htm

>
>I did some once already but now I'm struggling with it for quite some time to make it work. I want to output a report preview directly on a VFP form. For some reason the report opens by itself, outside of the form and I can't see what is missing.
>This is the code I'm using, if anybody can figure out what is wrong I would be glad:
>
>LOCAL loXH
>*
>*-- Create an extension handler object.
>loXH = NEWOBJECT("Custom")
>*
>oPC = NULL
>DO ReportPreview.App with m.oPC
>*
>*-- Assign the extension handler to the preview container.
>m.oPC.SetExtensionHandler(loXH)
>*
>*-- Create a standard report listener:
>loRL = CREATEOBJECT("ReportListener")
>loRL.ListenerType = 1
>loRL.PreviewContainer = m.oPC
>*
>CREATE CURSOR cuTest (Dummy C(10))
>APPEND BLANK
>*
>REPORT FORM TestReport TO PRINTER PROMPT OBJECT loRL NOWAIT NOCONSOLE
>*
>RETURN .T.
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform