Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The many faces of ... Multi layout report
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01186878
Message ID:
01186962
Views:
21
>I need to produce a report which will print totally different layouts based upon a data element in the cursor which is driving the report. I need to do this becase this is an application where the user expects to just go over to the printer and pull off a set of documents in order and use them without any further sorting or merging. We will need to produce something like merged sets of different documents in one run.
>

Assuming you're using VFP 9, I've just chained together reports using the reportlistener class (the FFC subclass of it). The code basically looked something like:
loListener = CREATEOBJECT("_ReportListener")
lcClause = "NOEJECT"
* Generate first report
loListener.AddReport("ReportName.FRX", lcClause)
* Generate second report
loListener.AddReport("ReportName2.FRX", lcClause)
lcClause = ""
* Generate final report
loListener.AddReport("ReportName3.FRX", lcClause)

loListener.RunReports(.T.) && .T. removes the reports from the list after each run
In my case, I actually was doing this inside of a loop (generating commission statements for several employees and merging them down into a single PDF report w/a table of contents using XFRX).

The nice thing about this is that each report can be developed independently, with whatever formatting you need.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform