Wiki Home

Rpt Engin

Namespace: WIN_COM_API

Amazing utility/wizard/whatever that is even more hidden that Visual FoxPro.

There is a theory that it is called from the VFP Report Wizard. Makes sense, but I am not sure how to confirm it. Is Rpt Engin is in an app form somewhere?

It is in Anyone have any info on it? Anyone even know it was there?
One and only one Google hit: (as of Jan 20, 2004 anyway.)

No mention of it in the VFP help.
It makes a nice looking FRX from the following:

1) a cursor
2) dbc settings
3) a template FRX.

And then there is the VFE subclass of it that uses:
4) VFE's class builder wizard
5) Dbcx

So someone has heard of it.

* Program....: rptengin.prg
* Notice.....: Copyright (c) 1995 - 1997 Microsoft Corp.
* Abstract...:
*  Report wizard engine.  Processing for:
*     1) Regular reports
*     2) Multi-column reports
*     3) Group reports
*     4) Labels
*     5) AutoReport

Unzip xSource under VFPs home dir (home(1)) and run this code:
Cd Home(1) + "tools\xsource\vfpsource\wizards\wzreport\"
Set Procedure To RptEngin, ..\WZCommon\WZEngine
Set Path To ..\WZCommon

Open Database Home(2) + "Northwind\Northwind"
Use employees

loRepEngine = Newobject("ReportEngine", "rptengin.PRG" )
With loRepEngine

	Dimension .aWizFields[ALEN(.aWizFList, 1), 1 ]
	For lnI = 1 To Alen(.aWizFList, 1)
		lcField = .aWizFList[lnI,1]
		? lcField
		.aWizFields[lnI,1]= Proper( lcField )

	.cStyleFile = Home(1)+"Tools\xsource\VFPSource\Wizards\wzreport\STYLES\STYLE2V"
	.cWizTitle = "My Report"
	.cOutFile =  Sys(2023)+"\Employees.frx"


Modify Report  Sys(2023)+"\Employees.frx"

Bam! You now have an FRX that is based on a template frx.

I am hoping to pair up Rpt Engin.prg with Cross Tab. I have it working 'good enough' for what I need, but it is kind of kludgy (I have to hack the resulting FRX.) I will be posting it soon.

For you VFEers, I think it is even too dynamic for dbcx. The headers are going to be stored in the application data, not dbcx Meta Data. Ok, so it is actually Meta Data that is being stored in the application's database. Point is: I don't think dbcx is going be a part of this.
See Also: GenHtml

Contributors Carl Karsten
( Topic last updated: 2004.02.10 01:59:44 PM )