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

Using and setting Custom Page size for a datawindow.

1,843 views
Skip to first unread message

Blotto

unread,
Dec 9, 2009, 12:16:15 PM12/9/09
to
Hello,

I am trying to dynamically set the page size of a datawindow
from within a PB11.1 application. The datawindow is static
and the unit of measure for the DW is set to 1/1000 of a
centimeter. I want the user to be able to set the size of
the data window by entering a Height and Width value in
Centimeters.... I am using this code:

dw_1.SetRedraw(FALSE)
dw_1.Reset()
dw_1.SetTransObject(SQLCA)
dw_1.Modify("DataWindow.Print.Preview = 'Yes'")
dw_1.Modify("DataWindow.Print.Preview.Rulers= 'Yes'")
dw_1.Modify("DataWindow.Print.Paper.Size=256")
dw_1.Modify("DataWindow.Print.CustomPage.Width=80")
dw_1.Modify("DataWindow.Print.CustomPage.Length = 30")
dw_1.Retrieve()
dw_1.SetRedraw(TRUE)

From PB documentation this should set the page size to be
8cm by 3cm. The datawindow still looks like a full 8.5" by
11" page ? I would have expected it to to resize and show
the proper page size...

Any ideas on this would be appreciated. Thanks.

Jerry Siegel [TeamSybase]

unread,
Dec 9, 2009, 2:10:52 PM12/9/09
to
You have set the paper size, not the size of the DW control. I would expect
to see the paper size within a blue rectangle in the DW. You might want to
try playing with Zoom.

--
Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement


<Blotto> wrote in message news:4b1fdb5f.22b...@sybase.com...

Blotto

unread,
Dec 9, 2009, 3:24:13 PM12/9/09
to
Hi Jerry,

I am setting the paper size. See the code in the body of the
original post. The 'page size' wording was incorrect. I do
see a blue rectangle but regardless of what I set the paper
size to it never changes...

Ivaylo Ivanov

unread,
Dec 10, 2009, 4:19:52 AM12/10/09
to
Hmmm... let me calculate your values:
CustomPage.Width = 80/1000 cm = 0.08 cm which is quite different than 8 cm.
CustomPage.Length = 30/1000 cm = 0.03 cm which is quite different than 3 cm.

Try to multiply your values by 100.

Also, have you experimented with any additional adjustment of
Datawindow.Print.Margin.Top/Bottom/Left/Right?

Regards,
Ivaylo

<Blotto> wrote in message news:4b1fdb5f.22b...@sybase.com...

Ivaylo Ivanov

unread,
Dec 10, 2009, 4:22:07 AM12/10/09
to
Oh I'm sorry... I thought that your Paper.Size was 255 :-(

"Ivaylo Ivanov" <n0_S_p_a_...@isy-dc.com> wrote in message
news:4b20bd38@forums-1-dub...

0 new messages