FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour landscape to a report sheet
Posts: 400
Joined: Fri May 11, 2007 08:20 PM
landscape to a report sheet
Posted: Mon Feb 14, 2011 11:14 PM

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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: landscape to a report sheet
Posted: Tue Feb 15, 2011 02:23 PM
Put

Code (fw): Select all Collapse
PRNLANDSCAPE()


just before the REPORT command.

EMG
Posts: 400
Joined: Fri May 11, 2007 08:20 PM
Re: landscape to a report sheet
Posted: Wed Feb 16, 2011 12:53 AM

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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: landscape to a report sheet
Posted: Wed Feb 23, 2011 03:01 PM

Don't forget to:

prnPortrait()

After the report also.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 989
Joined: Thu Nov 24, 2005 03:01 PM
Re: landscape to a report sheet
Posted: Thu Mar 17, 2011 09:04 AM

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"
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: landscape to a report sheet
Posted: Thu Mar 17, 2011 11:04 AM

Try putting PrnPortrait() after ACTIVATE REPORT command.

EMG

Posts: 989
Joined: Thu Nov 24, 2005 03:01 PM
Re: landscape to a report sheet
Posted: Thu Mar 17, 2011 11:18 AM

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"
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: landscape to a report sheet
Posted: Thu Mar 17, 2011 12:31 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 989
Joined: Thu Nov 24, 2005 03:01 PM
Re: landscape to a report sheet
Posted: Thu Mar 17, 2011 02:54 PM

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"

Continue the discussion