Ask Your Question

In Base how can all records in a grid be immediately available

asked 2017-07-27 16:35:11 +0100

meakasteve gravatar image

Can anyone help me solve a simple problem? I have a form which apart from some buttons contains a table displayed as a grid. When I open the form the record bar at the bottom of the grid shows that a 69 records are available. As I run the cursor down the right-hand side of the grid this number gradually increases but I have do a mouse click on the double arrow in the record bar to get the full 2000 entries. How can the grid be made to have all 2000 records available when the form is opened so that this clicking of the mouse is redundant?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-07-27 18:32:48 +0100

Ratslinger gravatar image

updated 2017-07-27 18:40:21 +0100

This is the number of records cached. It can be increased using a simple macro. Be aware, depending upon the setting and data, load times for the form may increase.

Sub ChangeFetchSize(oEvent)
    oEvent.Source.fetchsize = 2000
End Sub

You can attach this to the Open Document event of the form - from form edit menu Tools->Customize on Events tab.

Of course this is set to 2000. You may want a higher number to accommodate new records.

Additionally, this can be done using:

oForm = ThisComponent.Drawpage.Forms.getByName("INTERNAL_FORM_NAME")
oForm.FetchSize = XXXX

depending upon form design. You might have multiple forms or sub forms as such.

edit flag offensive delete link more


Problem solved! Thank you Ratslinger the macro works wonderfully! You are right there is a delay before records become available but the bar at the bottom is very narrow and difficult to see. Just out of interest do you know of any way to increase the height of the record-bar row whilst not affecting the height of the other rows in the grid which contain the data? This would make the buttons on the record-bar row more visible.

meakasteve gravatar imagemeakasteve ( 2017-07-27 21:28:16 +0100 )edit

If this answers your question please click on the ✔ (upper left area of answer).

For the Nav bar on the grid, there is no re-size per se. What I would do is remove the grid navigation bar (control property of table grid - set it to NO) and add a separate Navigation Bar control for the grid. This can be re-sized to your liking.

Ratslinger gravatar imageRatslinger ( 2017-07-27 22:20:13 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-07-27 16:35:11 +0100

Seen: 89 times

Last updated: Jul 27 '17