main logo
Subject: RE: VFP8 Reporting
Author: "Rich Simpson"
Posted: 2003/04/30 20:39:00
 
View Entire Thread
New Search


Hi Doug,

You are correct that you cannot see 2 reports in the same Report Preview
window in VFP 8. Each Report will come up in it's own Preview Window. This
is one of the main reasons I wrote my Report Engine/Preview Control.

You can download a fully functioning demo at:
http://www.mindseyeinc.com/ReportEngine/MindsEyeReportEngineSetup.exe

You only need the following code to combine 2 VFP reports into a single
Report.

SET CLASSLIB TO MindsEyeReportEngine
oReportEngine = CREATEOBJECT('MindsEyeReportEngine')
oRPT = oReportEngine.ReportFormObject('TestRptA.FRX')
oReportEngine.AppendReportToObject(oRPT,'TestRptB.FRX')
oRPT.Show

To have more fun with your reports you could do a Chart to summarize the
data on a new page at the end of the report by adding the following code:

*====================================

ocanvas = orpt.oREPORTENGINE
*
* NOW ADD A PAGE TO THE END FOR PLACING A GRAPH ON
*
ocanvas.NewPage
ocanvas.AddChart('',5,1,.5,6,4)
ocanvas.ChartAddXYData(20,0,'Software',255)
ocanvas.ChartAddXYData(80,0,'Hardware',RGB(0,255,0))
ocanvas.ChartAddXYData(240,0,'Service',RGB(0,255,255))

WITH oRPT
.orepORTENGINE.scale = 80
.Width = 900
.Height = 800
.left = 0
.RESIZE()
.Show
ENDWITH
oCanvas = NULL
RELEASE oCanvas


*==========================

That's all there is to adding a Graph on a new page. The Report Engine has a
lot of methods to programmatically create reports as well as code in the VCX
to run VFP Reports in combination with the FRX Engine inside the ActiveX
control.

If you have any problems with any VFP FRX Reports please let me know so I
can make improvements to my algorithms to make them work.


Rich Simpson
Mind's Eye, Inc.
rsimpson (AT) mindseyeinc DOT com
www.mindseyeinc.com




-----Original Message-----
From: profox-admin@leafe.com [mailto:profox-admin (AT) leafe DOT com]On Behalf Of
doug_bower@myob.com.au
Sent: Wednesday, April 30, 2003 6:45 PM
To: profox (AT) leafe DOT com
Subject: VFP8 Reporting


I'm trying to work out the new Printing features in VFP8, in particular the
new NOPAGEEJECT option on the REPORT FORM command.

I can get the multiple reports to print out in a single print job, but how
can i get the same effect in a preview? ie both reports appear in a single
preview window? What seems to happen is that one report is previewed, then
the other. I want to be able to go skip next page and skip to the second
report.

Is this even possible? Has anybody tried this yet?

Here is a small program i've been testing with

CD \Test
USE (HOME() + "\samples\tastrade\data\employee")
SET SAFETY OFF
CREATE REPORT TestRptA FROM Employee COLUMN FIELDS Last_Name
CREATE REPORT TestRptB FROM Employee COLUMN FIELDS First_Name
SET SAFETY ON

** Preview
REPORT FORM TestRptA NOPAGEEJECT PREVIEW IN SCREEN
REPORT FORM TestRptB PREVIEW IN SCREEN

** Print
REPORT FORM TestRptA TO PRINTER PROMPT NOPAGEEJECT
REPORT FORM TestRptB TO PRINTER NORESET

Thanks in advance

Doug



[excessive quoting removed by server]



 
©2003 Rich Simpson
<-- Prior Message New Search Next Message -->