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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print problems with Paradox 9

Status
Not open for further replies.

subroman

Technical User
Apr 11, 2001
18
0
0
US


I recently upgraded from Paradox version 8 to version 9. I am running into a problem when I run reports the print properties switches or changes to landscape orientation rather then portrait. This is intermittent. Is there a way to set the default to portrait and then switch to landscape on demand? The reports were originally created on version 8.
Would appreciate any help.
 
Are you printing from code or from the menu / dialog box?
If printing from code, use BOTH the reportPrintInfo and printerOptionInfo to set the required orientation, e.g. :
var
rptInfo reportPrintInfo
prnInfo printerOptionInfo
endvar

rptInfo.orient = protrait
prnInfo.orientation = prnPortrait
etc...
 
Thanks for the input,


We load the report from the launcher but print from the menu/dialog box. We are always able to change the properties, but the bulk of the reports are designed for portrait and I would like it to default to that. I am not adept at code. would the code added to the code on the launcher solve this problem?


 
Perhaps this will stop intermittent problem.

Open the affected reports in design mode, and click on Page Setup under the File Menu option. Under page orientation, select Portrait and hit OK. Save report to save setting. The report will automatically default to portrait at run-time, but a user can manually change to landscape.
 


Thanks for the tip, we tried that previously and it has not made a difference. I wonder if I should re-create the affected reports? Perhaps if the report is created on version 9 it will eliminate the problem.

 
This is rather odd. All of my reports converted from 4.5 to 9 without a problem.
 
Below is some code that I use to print a report called Avggraye. It prints to landscape then reverts the printer back to portrait. It works by opening the report momentarily and setting its print options before printing. You could attach it to a button and replace Avggraye with the name of your report.

========================================================

method pushButton(var eventInfo Event)

var
AvgRPT Report
ri Reportprintinfo
prnOptions PrinterOptionInfo

endVar

AvgRPT.open("Avggraye.rsl")

prnOptions.Orientation = prnlandscape

if printerSetOptions(prnOptions) then
AvgRpt.print("avggraye.rsl")
else beep() message("Could not open Report") sleep(1000)

Endif
AvgRPT.close()
prnOptions.Orientation = prnportrait
printerSetOptions(prnOptions)

EndMethod
 

I tried incorprating the code from Bystander in the code on the launcher. So far I am still getting intermittent prints
in landscape mode. I also tried to incorporate the code for PrinterOptionInfo from Ogriofa but it would not compile due to syntax error. I do not get the same error if I just use ReportPrintInfo. However ReportPrintInfo did not solve the problem.

The problem occurs on some report and not others. All of the reports were created on version 8.

I may just have to recreate the affected reports.

Thanks for your help.


 
Subroman, I had the same problem with paradox 9! I would always have my reports default to landscape on the first print for that particular session. You will be happy to hear that I solved it finally by downloading the most current service pack from corel (sp3 I think). The problem, I believe, is not in your code or the default report setup. It is in Paradox 9 and Paradox 9 runtime. Give it a try. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top