Hi,

I am currently working on a project to allow our client to
define custom labels with a custom paper size defined to
match various sized labels.

I am using 'Print.Paper.Size=256' to assign a custom paper
size to my datawindow but the paper size does not appear to
be changing in the preview.

Below is my code to assign the custom paper size:

dw_1.SetRedraw(FALSE)
dw_1.Reset()

ls_return = dw_1.Modify("DataWindow.Print.Paper.Size=256")

ls_return =
dw_1.Modify("DataWindow.Print.CustomPage.Length=110")
ls_return =
dw_1.Modify("DataWindow.Print.CustomPage.Width=220")

ls_return = dw_1.Modify("DataWindow.Print.Preview = 'Yes'")
ls_return = dw_1.Modify("DataWindow.Print.Preview.Rulers=
'Yes'")

dw_1.Retrieve()
dw_1.SetRedraw(TRUE)

The code above displays the datawindow with a paper size of
22cm x 28cm rather than the 11cm x 22cm.

I did notice that the preview seems to be fetching the paper
size based on the default paper size from the printer driver
rather than the custom paper size specified in the code.

How would i go about assigning a custom paper size and
displaying it in preview mode in a data window?

I am using Powerbuilder 11.1 Build 8204 on Windows Vista.

Any help would be greatly appreciated.

Thanks,

Karen