Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Richtext datawindow landscape help please

155 views
Skip to first unread message

leorodrigues

unread,
Oct 2, 2009, 11:51:27 AM10/2/09
to
In Powerbuilder 11.5, I am using a richtextedit datawindow
to import a text file and display it on the screen before
giving the user the option to print it.

I want to print and display it in landscape mode, but the
datawindow does not display in landscape, no matter if the
properties are set in the IDE or using script at run time.

===== here's some code ======

string stemp, sfontname, sfontsize, sfontfamily
long lthis, lmax
sfontname = "Courier New"
sfontsize = "9"
sfontfamily = "modern"
stemp = "{\rtf1\ansi\deff0{\fonttbl{\f0\f" + sfontfamily + &
" " + sfontname+ "}}\qj" + "{\f0\fs" +
string(integer(sfontsize)*2) + &
"\cf0\up0\dn0\par}}"

dw_1.pastertf(stemp)
dw_1.insertdocument(myfile, False, FileTypeText!)

=====end code====

If I leave the popup menu available, and drill into the
properties window and click on the print specifications tab
and click ok...THEN my screen changes to landscape and my
print job comes out as desired.

What gives?

I appreciate any help?

-Leo

Chris Pollach

unread,
Oct 2, 2009, 1:03:10 PM10/2/09
to
Hi Leo;

Did you set the RTE object into PrintPreview mode?

RTE_xxx.Preview (TRUE)

I do not believe that you will see the landscape setting unless you are in
that mode.

FWIW: Same for the DataWindow
DC.Object.DataWindow.Print.Preview = 'Yes'


HTH

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com


<Leo Rodrigues> wrote in message news:4ac6217f.ae...@sybase.com...

leorodrigues

unread,
Oct 2, 2009, 2:22:50 PM10/2/09
to
Chris,

thanks for the reply.

I will try tweaking more properties, including the preview
one.

Meanwhile, the real issue is that after migrating from PB
10.2 to 11.5 our reports are not printing correctly. Namely,
the left margin is cutting the first 2.5 characters of the
report.

Fixing the margin in the IDE via the dwo properties fixes
the left margin, but we still get the top pushing the
beginning of the text down (and seemingly to the right).

creating a new rte datawindow and importing the report
contents into it is one approach i am taking and that seems
to work but only if i fix the landscape issue.

The report comes from the application server in the form of
a text file. We insert the rtf encoding into the rte control
as exemplified in here and append the contents of the text
file into it at FileTypeText.

Any insight is appreciated and I will be trying your
suggestions.

Thanks,

-Leo

Chris Pollach

unread,
Oct 2, 2009, 2:59:34 PM10/2/09
to
Did you apply the 11.5.1 MR (build 4011)?

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com


<Leo Rodrigues> wrote in message news:4ac644fa.10b...@sybase.com...

leonrodrigues

unread,
Oct 2, 2009, 3:25:34 PM10/2/09
to
No. Let me check on that....

leorodrigues

unread,
Oct 2, 2009, 4:01:41 PM10/2/09
to
Chris,

those are localized runtime files...

leorodrigues

unread,
Oct 2, 2009, 5:03:11 PM10/2/09
to
Chris,

I've installed the build. The issue of landscape format
being displayed seems to be solved. As a bonus both the
powerbuilder IDE and my application are running
significantly faster :-).

I still have to tweak things around.

Question:

does it make a difference whether I try to print from a
datastore or a datawindow? The datastore does not seem to
have print properties like
datastore.object.print.margin.left = '2'

thanks,

-Leo

Chris Pollach

unread,
Oct 5, 2009, 7:17:55 AM10/5/09
to
Hi Leo;

That is Excellent news!

No ... there should be no difference between a DS vs DC. Either way ... the
print properties you are setting on the "datastore.object.print.xxxx.xxx =
'??'" are the DW object's not the controls. So this should again work in
either a DS or DC.

Note: In your example syntax ... it should be coded:
DS.Object.DataWindow.Print.Margin.Left = '2'

HTH

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com


<Leo Rodrigues> wrote in message news:4ac66a8f.171...@sybase.com...

leorodrigues

unread,
Oct 6, 2009, 1:28:21 PM10/6/09
to
Thanks Chris,

the teaking will continue.

leorodrigues

unread,
Oct 7, 2009, 11:57:05 AM10/7/09
to
Chris,

I hope you're still reading this thread, if not I will
create a new one.

build 4011 fixes issues if the datawindow object properties
come from the datawindow painter.

If we try to make property changes programmatically, they
are being ignored at runtime.

It seems like this continues to be a bug (an improved bug
but still a bug on the RTE control).

Also, if displaying the popup menu and navigating to the
print specifications tab then the properties take effect.

Unless there is some command to instruct powerbuilder to
'accept' the programmatically done changes and repaint the
datawindow then this is a bug.

Any thoughts,

-Leo

Chris Pollach

unread,
Oct 7, 2009, 12:19:20 PM10/7/09
to

You can always *trick* the DWO into repainting by using the old GroupCalc
( ) method.
Even if you have no groups - this should force the repaint. Give that a try.

HTH


<Leo Rodrigues> wrote in message news:4accba51.46c...@sybase.com...

naren

unread,
Oct 21, 2009, 2:59:56 PM10/21/09
to

----------------------------------------------Naren
Here-----------------------------------------

i migrated application from PB 7 to PB 11.5

rte works good in PB 7

but when i migrated to PB 11.5

rte in the preview mode is not displaying any tool bar for editing
the margins .

did naything channged in this setting in PB 11.5 or i have to give any
special properties to appear the margin editter in the preview mode ,

please help me ,i am struggling with this for past 10 days .


Thanks,
Naren Nunna

naren

unread,
Oct 21, 2009, 3:56:19 PM10/21/09
to
On Oct 5, 7:17 am, "Chris Pollach" <cpoll...@travel-net.com> wrote:
> Hi Leo;
>
>     That is Excellent news!
>
> No ... there should be no difference between a DS vs DC. Either way ... the
> print properties you are setting on the "datastore.object.print.xxxx.xxx =
> '??'" are the DW object's not the controls. So this should again work in
> either a DS or DC.
>
> Note: In your example syntax ... it should be coded:
> DS.Object.DataWindow.Print.Margin.Left = '2'
>
> HTH
>
> --
> Regards ... Chris
> ISUG - NA RUG Directorhttp://chrispollach.pbdjmagazine.com<Leo Rodrigues> wrote in messagenews:4ac66a8f.171...@sybase.com...

-------------Naren Here
------------------------------------------------------------------

Hi ,
i have migrated my application from PB 7 to PB 11.5

after migrating i cannot see the margin edit toolbar in the preview
mode of RTE .

shall i have to ad any more commands ti display margin edit tool bar
in mpreview mode of RTE ?

any suugestions are appreciated .
please help ,i am struggling with issue from 1 month .


Thanks.,\
Naren Nunna

naren

unread,
Oct 22, 2009, 11:52:15 AM10/22/09
to
On Oct 7, 11:57 am, Leo Rodrigues wrote:

hi,
i have migrated from PB 7 to PB 11.5
i dont find the margin edittor in the preview mode of rich text
edit ,
we need the margin edittor in preview mode to mainly adjust the top
and below margins ,
is that we have to include any more setting's for the rte preview
mode
in PB 11.5?
--- we give a commad like this rte_display.preview(TRUE)
but we could not find the margin edittor in the preview mode ,


please help me ,i am struggling ,


any suggestions are appreciated .


Thanks,
Naren Nunna

0 new messages