Вопрос

I'll just straight to the question, does DataWindow control has pagination? Or do we have to write our own pagination code? Can anyone give information about Data Window pagination.

I'm using PB ver 9.0. In what version pagination is available?

PS. I don't understand PB, but having a project in PB right now

Thank you

Это было полезно?

Решение

Datawindow has Pagination since PB possibly 1.0 as Terry said. I am seeing it since PB 2.0 and till 12.5 that is the present out there. However, if you are seeking how to provide the interface for First, Prev, next and Last then you need to place buttons on Window or on the DataWindow object and place some one liner codes as follows.

In case of Window command buttons, you need to use the following code: First:

dw_1.ScrollToRow(1)

Prev:

dw_1.ScrollPriorPage()

Next:

dw_1.scrollNextPage()

Last:

dw_1.ScrollToRow(dw_1.rowcount())

If using datawindow object buttons, you may just select the appropriate action from the drop down options. All such actions are available as simple options.

With this information, merge the info that Terry provided that of rendering a display. If you are displaying data on screen then the DataWindow control uses the datawindow control dimensions to render the pagination i.e. calculates the no of pages etc. If you write the following code it will render the page as per the page settings of the default printer or the printer set as the current printer.

dw_1.Modify("datawindow.print.preview=yes")

To set the currently select printer use the following code:

PrintSetup()

Cheers!

Другие советы

Yes, DataWindows have pagination. You can have page headers and footers. The page length will be different depending if you're talking about a control on a window (the size of the control) or printing (the size of the physical printed page, which you can set at design time or dynamically).

Good luck,

Terry.

In addition to what Terry said, the DataWindow will use the default printer for the page dimensions unless you have set PrinterName in the DataWindow properties. Search the help for the DataWindow's Print properties for all the things you can set to control the way the DataWindow prints.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top