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

Printing envelop rotated 90 degr.

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
I am wondering how I can effect the direction of the text on an envelop I like to print.
I did some experiments with hacking the report orientation=0 / orientation=1 in the field 'str', 1st record.
As a result the direction of the paper rotates but not the entire text on it, just the papersize.

Although I am using VFP9SP2 I still use the oldfashioned report-generator.
Is changing to the reportlistener the only solution to achieve my goal?

TIA
-Bart
 
Hi,

If you want to rotate your text in your report, your best bet is indeed Reportlistener90 here you have an easy option.
However in your case of printing an envelop I believe you are easier of to change the printing orientation of your printer from landscape to portrait. This is easy done in the printpreview by hand, or in code. Open the FRX file as a table (USE YourReport.FRX) and look at the Expr column in the first record. It should contain printer settings - something like:

ORIENTATION=0 this you change to 1
More info is in PRTINFO() help topic.

Groet,

Jockey(2)
 
I think you can achieve that via Printer Settings, nothing VFP would be involved.

But you can use the report designer feature to rotate text by just setting reportbehaviour 90, no need to do a reportlistener to get at new features.
I don't think it's easier, thoug, you can rotate any report control, label, bound control etc., but even when using multiselect to only do this once. Every control rotated by 90 degrees does not rotate the whole report 90 degress, every control is roateted against another rotation point, so you also will have to rearrange everything.

No, the solution to print an envelope with different orientation surely is in printer options, not on the report side, think about it.

Bye, Olaf.

 
Jockey(2)
I am with you that possibly the reportlistener does what is wanted.
As I described in my post hacking the report and play around with orientation only effects the paper. Not it's contents.

Olaf
I tried to rotate a textbox on the report but without a visible effect.
Does this possibly require other settings as well? (Remember I use the oldfashioned reportbehaviour)
I also tried with printer settings to go from portret to landscape but again, same as with hacking the report this only effects the paper, not it's contents.

-Bart
 
The effect isn't visible in the designer. That's by design. The preview will show report controls rotated. As far as I remember each rotation is done with the rotation point at the left side of the control. So what you can do for example is rotate all captions with an angle of 30° to have more room for longer captions, but that feature is not to rotate the whole page AFAIK. I'm not the report guy, though.

Bye, Olaf.

 
As far as I remember in order to take advantage of the rotated text, you need to use the reportlistener.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
That might be the case. I doubt it, but perhaps there was a report fix also adressing the rotation. Nevertheless The MSDN forum thread contains a screenshot of Pavel of the feature within the report designer. You can set the rotation angle, but not see it. It only is visible during execution, but that does need a reportlistener, you can also simply run a good old REPORT FORM in REPORTBEHAVIOUR 90.

Bye, Olaf.
 
>but that does need a reportlistener
Of course I meant to say and repeat: but that does NOT need a reportlistener

Bye, Olaf.
 
That might be the case. I doubt it, but perhaps there was a report fix also adressing the rotation. Nevertheless The MSDN forum thread contains a screenshot of Pavel of the feature within the report designer.

Yes, but the screen shot shows that the rotation setting is on the Advanced tab in the Properties dialogue. My understanding is that the Advanced tab was only added in SP2.

It doesn't matter to Bart, who I know is using SP2. But I thought I'd mention it for the benefit of anyone who isn't.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Was it only added in SP2? OK, I can't easily roll back to see, but my understanding of SP2 is, it merely did some bugfixes and no new features. Maybe the latter is just true for the hotfixes and you're right. I know better about when new features were added, when I won't want to do without them, like READWRITE in VFP7 and TEXT TO Variable and some more.

Bye, Olaf.



 
Actually, Olaf, there were a number of new features in SP2, especially related to reporting. If you have the Sedna/SP2 book, you can read all about them. You can see the Table of Contents at: Scroll down for the detailed version and you can get a pretty good idea what was added.

Tamar
 
Just for the records:
As I experienced, to see rotated objects on the report this requires a reportlistener.
-Bart
 
I think your logic is wrong, using a reportlistener forces reportbehavior 90, but I simply changed a report in Home()+"/Tools/Filespec/" and rotatated a label and that worked without a reportlistener, qed. All you need is SET REPORTBEHAVIOR 90.

Bye, Olaf.
 
Olaf,

I just checked and you are right:
Set Reportbehavior 80 >> no rotated objects in report
Set Reportbehavior 90; same report >> objects apear rotated in report.

Set Reportbehavior 80; same report using reportlistener >> objects apear rotated in report

-Bart

 
>Set Reportbehavior 80; same report using reportlistener
Well, and that's just because reportlisteners enforce reportbehavior 90.

Print SET("Reportbehavior") somewhere in your report and you should see that even though you start and you may end with reportbehavior 80, any listener used switches to behavior 90.

Bye, Olaf.
 
Bart,

your
Set Reportbehavior 80; same report using reportlistener

I dont know what you are doing here exactly with 'using reportlistener' what kind of code are you talking about?
The Reportbuilder.app / Reportoutput.app and Reportpreview.app are all 3 part of reportbehavior 90. As far as I know the class _reportlistener.vcx is part of this/makes use of these 3 apps.

Regards,

Jockey(2)
 
Indeed Joykey is right, and reportlisteners are a new reporting feature only working in bahvior 90. I believe using a reportlistener class for reporting will set that reportbehavior anyway, otherwise the reportlisteneer events are not triggered.

One way to use a report listener is REPORT FORM ... OBJECT oReportlisternerobject

Help on REPORT FORM says: The OBJECT clause on an individual REPORT FORM command takes precedence over the current setting of SET REPORTBEHAVIOR.

So that's where REPORTBEHAVIOR 90 is enforced by using a reportlistener.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top