Ask Your Question
1

Persistent column widths: tables, views, queries, & form table controls

asked 2017-03-17 03:46:46 +0100

EasyTrieve gravatar image

updated 2017-03-17 05:31:37 +0100

Persistent column widths?

  • Of the four types of tabular data in Base, is the Query the only one that doesn't have persistent column widths? (I also noticed that a View's column widths are sometimes forgotten from LO session to session, but they seem to be retained always so long as you don't restart LO.)

  • Is there a way to make the column widths of a Query and View persistent (i.e. remembered from session to session), or am I doing something wrong?

  • Does any of this depend on the particular database one is using or connecting to?

In other words, when I open a Table, I can adjust a column width manually, either by dragging left or right, or by double clicking on the line between two columns. And when I close the Table and then re-open it later the column width is remembered. The same seems true in Views and in Form Table Controls.

But this does not appear to work in a Query. Each time I run a Query to view the data, it forgets the previous column widths and sets new unhelpful column widths.

Currently using LO 5.2 & Connecting to MariaDB.

Note, that when "connecting" to a data base, (i.e. not using the Embedded HSQLDB data base), the actually View setup is inside the connected to DB (in my case in MariaDB), not in LO. I imagine this is faster.

You can create a View by first creating a query, then saving it. Then right clicking on it and selecting Create as View. BUT! You won't be able to edit it again in design mode. It's now designed in SQL within the MariaDB server. To edit it you need to directly edit it's SQL. (Possibly you can copy it's SQL into a query's SQL, then switch to design mode. I tried this and am still working the bugs out of this approach. It works for simple, but not more complex queries.)

Gripe: So the design cycle is awkward: 1) Create a query. 2) Create a View. 3) Set column widths. 1a) Change the query. 1b) Again create a View. 1c) Setup all of your column widths all over again! What a pain.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-04-21 18:32:29 +0100

EasyTrieve gravatar image

Ratslinger answered:

Tables, Views, Queries and table controls all use the data aware grid control. The structure is created at design time.

When a query is run, a new data aware grid control is created to display the contents. When it is closed the control is destroyed. Thus, any changes in dimensions made on the first run are lost on subsequent runs.

The other three typically retain the dimensions made after editing. Table and View dimensions can change if the structure of the Table/View is modified.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-03-17 03:46:46 +0100

Seen: 193 times

Last updated: Apr 21 '17