Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing multiple reports as a batch
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00266102
Message ID:
00266120
Views:
24
>I am running a series of reports that I want to print in the same print job.
>Any suggestions?

I recently had a similar request, but the client went a step further and wanted no page break between the reports in an effort to save paper. There were 4 reports based on user supplied date filtering. Once the user supplied a date range, the client wanted the 4 existing reports to run back to back with no page breaks. My first reaction was "no, you can't do that". Then after thinking about it, I came up with a way to do it, albeit a somewhat complicated one, but the customer was paying for it so....

For each of the tables for the 4 reports, I ran a SQL statement that gathered the data into a cursor. Each of the tables had different field names/types, but each of the reports had a date field (typically the date of the entry) in the first column followed by several more columns of field data. So for each table, I collected the date column into a common name (ie datercd AS DateIn or dateent as DateIn). Then each of the other fields were collected into a common Other field (ie STR(Amount) + ' ' + Desc + ' ' + ... AS Other). Finally, a table identifier was hard coded into a field. The result was 4 cursors with common field names/types including a field that identified the source of the data for report grouping. Then a SQL UNION pulled the 4 cursors together as one cursor and the report was run against that. It wasn't the most elegant solution, but it worked! Bottom line was a happy client, isn't that what counts?
Oct 31 = Dec 25
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform