landscape to a report sheet

landscape to a report sheet

Postby artu01 » 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
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: landscape to a report sheet

Postby Enrico Maria Giordano » Tue Feb 15, 2011 2:23 pm

Put

Code: Select all  Expand view
PRNLANDSCAPE()


just before the REPORT command.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: landscape to a report sheet

Postby artu01 » 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
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: landscape to a report sheet

Postby James Bott » Wed Feb 23, 2011 3:01 pm

Don't forget to:

prnPortrait()

After the report also.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: landscape to a report sheet

Postby Carlos Mora » Thu Mar 17, 2011 9: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"
Carlos Mora
 
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: landscape to a report sheet

Postby Enrico Maria Giordano » Thu Mar 17, 2011 11:04 am

Try putting PrnPortrait() after ACTIVATE REPORT command.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: landscape to a report sheet

Postby Carlos Mora » 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"
Carlos Mora
 
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: landscape to a report sheet

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: landscape to a report sheet

Postby Carlos Mora » Thu Mar 17, 2011 2: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"
Carlos Mora
 
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests