Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page Orientation
Message
 
To
27/11/2000 10:49:30
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00445690
Message ID:
00445719
Views:
18
>Two machines print to the same printer. One machine is the development environment. The printer is not the default on either machine. The printer is called by code. On the dev machine the report prints out properly in landscape but the second machine prints out in portrait. How can I fix this?

When I distribute my app I run all my reports through the following code. This strips out the printer info left in the report from the developement machine. You might try it and see if that is the problem.

code:
LOCAL lcSaveDefault, lcSavepath, lcReportDir, laReportArray
lcReportDir = ''
DIMENSION laReportArray[1]
lcSaveDefault = SET('DEFAULT')
lcSavepath = SET('PATH')

lcReportDir = GETDIR('','Where is Report Directory?')

SET DEFA TO (lcReportDir)
SET PATH TO (lcReportDir)

ADIR(laReportArray,'*.FRX')

FOR i = 1 To ALEN(laReportArray,1)
  SELECT 0
  USE laReportArray[i,1] ALIAS FixReport
  LOCATE FOR Objtype = 1 AND Objcode = 53
  REPLACE FixReport.Tag WITH ""
  REPLACE FixReport.Tag2 WITH ""
  * Possible bug in that this removed the landscape and portrait settings
  *REPLACE FixReport.Expr WITH "" 
  USE
ENDFOR

=messagebox('Processed ' + ALLTRIM(STR(ALEN(laReportArray,1))) + ' Reports')

SET DEFAULT TO (lcSaveDefault)
SET PATH TO (lcSavepath)
Please back up the report before you try this just to be safe.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform