Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using printer control codes in a report

Status
Not open for further replies.

mzvada

Programmer
Oct 28, 2002
9
0
0
HU
Hallo ,

I use the FPD26 with windows op. system.
Can anybody tell me a solution for the problem described bellow?

I have a billing document (report), in which I have to use different CPI values, and another control codes. We want to use different printer type to print the bills (matrix, laser, inkjet)

My program use the standard printer driver selection program, which use the printer control codes stored in the 'p_codes.dbf' standard table. But in this case I can adjust only the whole page format, not the lines and fields on the form.
My question is: Can I insert a CPI control code, which depends on the selected standard printer type? How can I use the _pdparm[8] parameter defined by the genpd.app?

(I hope, my problem description is understandable...)

Thank's in advance:

Martin
 
The following is, by no means, the only way to approach your issue, but it worked for me a many years ago.

I needed to have a FPD application work on different printers for different users. Those different printers each had their own unique set of control codes which were utilized on separate areas within the reports.

While I might have atttempted to use the P_Codes.dbf method, I ended up chosing (out of naiveté?) a different method which, while not simple, did work well.

The printers were specific to users so first I introduced a login screen which enabled the application to "know" who it was using it.

By knowing the user the application also knew which printer they were using since they could individually select their own default printer via a User Properties screen. That printer selection was saved and retrieved on login.

Note: this login and data retreival approach would not be necesary if your application required the user to select their printer each time before running the report, but for these users that was not acceptable.

The control code strings per printer were stored and retreived to populate report memory variables prior to executing the report.

Within the report I added single character width fields into blank lines, etc. and whose field value contained the appropriate printer control code strings.

In that manner the reports could, within the individual lines of the report, turn on and off Bold, Condensed, etc. parameters specific to the printer.

Perhaps someone else has a MUCH simpler method of doing what you need (I hope so!!!) but, if not, you have at least one approach.

Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top