landscape to a report sheet

Post Reply
artu01
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

landscape to a report sheet

Post by artu01 »

Hi, How to get landscape an sheet using report class

I tried this way:
ACTIVATE REPORT oRpt ;
on init oRpt:PrnLandScape()

but not working

Also tried:

ACTIVATE REPORT oRpt ;
on init oRpt:oDevice:SetLandScape()

Can you help me?

Thanks!

My configuration is: Fwh8.11, xharbour build 1.1.0 (Simplex) (Rev.6195), pellesC
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
User avatar
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: landscape to a report sheet

Post by Enrico Maria Giordano »

Put

Code: Select all | Expand

PRNLANDSCAPE()


just before the REPORT command.

EMG
artu01
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: landscape to a report sheet

Post by artu01 »

you are right Enrico!

i had declared PrnLandScape() after REPORT oRpt when I should have earlier

Now if you work

Thanks
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: landscape to a report sheet

Post by James Bott »

Don't forget to:

prnPortrait()

After the report also.

Regards,
James
Carlos Mora
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: landscape to a report sheet

Post by Carlos Mora »

I have the same problem and was solved using PrnLandscape() just before REPORT command, and put the PrnPortrait after the command, but the all the following reports remains landscaped.

I try the prnportrait after activate report but with the same wrong results.

What am I doing wrong?
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
User avatar
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: landscape to a report sheet

Post by Enrico Maria Giordano »

Try putting PrnPortrait() after ACTIVATE REPORT command.

EMG
Carlos Mora
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: landscape to a report sheet

Post by Carlos Mora »

Hi Enrico,

tried already (read again my message :) )

Don't know why, but the only solution is to put prnportrait() just before the rest of reports. Given that, it should work after ACTIVATE, but didn't.

Thanks
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: landscape to a report sheet

Post by James Bott »

Carlos,

You might try:

ACTIVATE REPORT...ON END prnPortrait()

Or, you might have to add a sysrefresh():

ACTIVATE REPORT...ON END (sysRefresh(), prnPortrait())

However, it is probably not a bad idea to make sure any report is in the proper orientation before printing since it may have been left in the wrong orientation by any other report or program. So your solution of prnPortrait() before any report is probably a good idea. It would also be polite programming to save and restore the original printer orientation during any report.

Regards,
James
Carlos Mora
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: landscape to a report sheet

Post by Carlos Mora »

Thanks James!

I like the ON END solution, i'll give it a chance.
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Post Reply