[Solved] File structures and forms multilevel
[Solved] File structures and forms multilevel
it has been a long time I did not work with database so need a little help to get one going!
i would like some files with keys
and need at least 3 or 4 levels of 1 to N
I need files as follow
1 - let says some Panel specs
2 - CB XY
3 - Cables length in multiple sections
with Boxes or connections
How can I do this 3 levels definitions for these data files
I can add one key in each file
then you do the relationships ?
now i see that Forms seems to be limited to 2 levels of file
so i guess that only way to have more level is to use a Query
can someone confirm this ?
Thanks for any feedback
have a nice day
i would like some files with keys
and need at least 3 or 4 levels of 1 to N
I need files as follow
1 - let says some Panel specs
2 - CB XY
3 - Cables length in multiple sections
with Boxes or connections
How can I do this 3 levels definitions for these data files
I can add one key in each file
then you do the relationships ?
now i see that Forms seems to be limited to 2 levels of file
so i guess that only way to have more level is to use a Query
can someone confirm this ?
Thanks for any feedback
have a nice day
Last edited by MrProgrammer on Sun Dec 24, 2023 2:34 am, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Openoffice 3.1 Win 10 64 bits
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: File structures and forms multilevel
You are limited to two levels on Base forms when using the the Form Design Wizard, but multi-level forms are easy to create in the Form Design/Edit mode.
Open your form in the Edit/Design mode and open the Form Navigator on the Form Design Toolbar usually found along the bottom of the form window.
In the Form Navigator pane right click on the form you want to add another level to, and select New->Form.
Right click on the newly created form and select Properties to open the Form Properties dialog.
On the General tab you can change the name of the form to something more meaningful.
On the Data tab you can select the Content type.
If you chose Table then on the Content line select a Table name from the drop down list.
If you chose Query then on the Content line select a Query from the list of predefined queries.
If you chose SQL command then either enter the text for a query or click on the ellipsis to open the Query Design dialog.
Then choose the appropriate fields for Link Master field, and Link Slave field.
Next add a control to your form.
If you didn't close the Form Properties dialog it will change to the Control Properties dialog otherwise right click on the new control and select Control to open the dialog.
On the Data tab select a Data field from the list of available fields.
On the General tab you can rename the control to something more meaningful.
Using this process you can enter as many levels as you need.
Open your form in the Edit/Design mode and open the Form Navigator on the Form Design Toolbar usually found along the bottom of the form window.
In the Form Navigator pane right click on the form you want to add another level to, and select New->Form.
Right click on the newly created form and select Properties to open the Form Properties dialog.
On the General tab you can change the name of the form to something more meaningful.
On the Data tab you can select the Content type.
If you chose Table then on the Content line select a Table name from the drop down list.
If you chose Query then on the Content line select a Query from the list of predefined queries.
If you chose SQL command then either enter the text for a query or click on the ellipsis to open the Query Design dialog.
Then choose the appropriate fields for Link Master field, and Link Slave field.
Next add a control to your form.
If you didn't close the Form Properties dialog it will change to the Control Properties dialog otherwise right click on the new control and select Control to open the dialog.
On the Data tab select a Data field from the list of available fields.
On the General tab you can rename the control to something more meaningful.
Using this process you can enter as many levels as you need.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: File structures and forms multilevel
i will try your method
and see if I can find a short video to demonstrate this
1 ) i already defined many fields in another database
is there a way to copy and paste fields definiton from one database to another one ?
any video tut showing this ?
2 ) when you define a file with a primary key
you can use a default integer field
but this is not field i need to sort my records
so is there a way to add another field like Name of a panel as a key and use that key for doing
a query and sort records ?
i will try to upload sample database when i get it to start to work
thanks
have a nice day
and see if I can find a short video to demonstrate this
1 ) i already defined many fields in another database
is there a way to copy and paste fields definiton from one database to another one ?
any video tut showing this ?
2 ) when you define a file with a primary key
you can use a default integer field
but this is not field i need to sort my records
so is there a way to add another field like Name of a panel as a key and use that key for doing
a query and sort records ?
i will try to upload sample database when i get it to start to work
thanks
have a nice day
Openoffice 3.1 Win 10 64 bits
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: File structures and forms multilevel
One way is to use Copy and Paste. Select the table in the source database and press <Ctrl>C then in the destination database select Tables and press <Ctrl>V. That will start a Copy table dialog that gives a number of options.is there a way to copy and paste fields definiton from one database to another one ?
Add an ORDER BY statement to your query. Something likeis there a way to add another field like Name of a panel as a key and use that key for doing a query and sort records ?
Code: Select all
SELECT * FROM "Table" ORDER BY "Name" ASC;
You can also sort by multiple fields for instance
Code: Select all
SELECT * FROM "Table" ORDER BY "LastName" ASC, "FirstName" ASC;
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: File structures and forms multilevel
here is beginning of tables definitions
hope this make sense
image did not upload!
is there a minimum post before uploading files in forum ?
I can add it to pastall site instead with link
http://pasteall.org/pic/index.php?id=120397
thanks
hope this make sense
image did not upload!
is there a minimum post before uploading files in forum ?
I can add it to pastall site instead with link
http://pasteall.org/pic/index.php?id=120397
Edit: 2023-12-23: Broken link disabled -- MrProgrammer, forum moderator |
Last edited by MrProgrammer on Sun Dec 24, 2023 2:28 am, edited 1 time in total.
Reason: Broken link
Reason: Broken link
Openoffice 3.1 Win 10 64 bits
Re: File structures and forms multilevel
Try to connect a new Base document to that mysterious other database. What kind of database is it? Possibly you can simply work with that one.
What most users do not understand: Base is NOT a database. It is a minimalistic tool set to work with external databases and make them accessible from ODF documents. The whole Base component is a tiny extra to this office suite. It is shipped with an old version of HSQL so you can build simple relational databases from scratch, good enough for demos and educational purposes. The embedded HSQL 1.8 ist not the type of database that should be used for productive database applications.
What most users do not understand: Base is NOT a database. It is a minimalistic tool set to work with external databases and make them accessible from ODF documents. The whole Base component is a tiny extra to this office suite. It is shipped with an old version of HSQL so you can build simple relational databases from scratch, good enough for demos and educational purposes. The embedded HSQL 1.8 ist not the type of database that should be used for productive database applications.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: File structures and forms multilevel
Your tables appear to make sense, but in my experience using a Text field for the Primary Key often leads to problems at a later date. What in the beginning looks like a unique text field often turns out not to be as unique as originally thought, and then you are stuck with having to rebuild your table and possibly queries, forms and reports just to enter a new record. It is usually better to use an automatically generated Integer for the Primary Key.
Look at this Tutorial for the rules for uploading to this Forum.
viewtopic.php?f=74&t=8289
Look at this Tutorial for the rules for uploading to this Forum.
viewtopic.php?f=74&t=8289
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: File structures and forms multilevel
i know pri key
it has to be unique and the field I selected will be even if it does not look like it and it has to be that cause it is what I want and need LOL
i did read a little the intro manuel for Base
but some parts are not that clear or difficult
mind you there are so many things to learn
and i never use that one before so a bit difficult to start
the database i want to do is very simple as a structure / relationships of data
just that it needs 3 levels of relationship
after that just a matter of doing some relatively simple query for a nice report
and it should do the list i need hopefully
or i will have to get MS suite with DATABASE which i have not touch in over 10 years!
this option is not really good cause i don't have a lot of need for database
I just only need this long list of cables i have to do with a nice report
i would do it in Calc but it does not really have a nice way to make a clean report as in the Database soft
i will study this this night and try to be back tomorrow
for other tips if possible
and thanks for your feedback
it has to be unique and the field I selected will be even if it does not look like it and it has to be that cause it is what I want and need LOL
i did read a little the intro manuel for Base
but some parts are not that clear or difficult
mind you there are so many things to learn
and i never use that one before so a bit difficult to start
the database i want to do is very simple as a structure / relationships of data
just that it needs 3 levels of relationship
after that just a matter of doing some relatively simple query for a nice report
and it should do the list i need hopefully
or i will have to get MS suite with DATABASE which i have not touch in over 10 years!
this option is not really good cause i don't have a lot of need for database
I just only need this long list of cables i have to do with a nice report
i would do it in Calc but it does not really have a nice way to make a clean report as in the Database soft
i will study this this night and try to be back tomorrow
for other tips if possible
and thanks for your feedback
Openoffice 3.1 Win 10 64 bits
Re: File structures and forms multilevel
As already stated, Base is NOT a database. It is a bridge between databases and office documents. You can store things in some relational database, connect a Base document to it, add some meaningful queries and drag them into Writer or Calc. You can create simple Base reports which are just Writer tables embedded in the database document. Serial letters (aka mail merge, aka form letters)are Writer documents with database snippets in the text flow. If you want something good looking with a not necessarily tabular layout, you can install the report builder extension. I use Calc for all my reports since I can handle Calc, spreadsheets offer a lot of extra functionality and the layout capabilities are sufficient.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: File structures and forms multilevel
May I suggest a compromise that should cover both your and the database engine's needs? The database will work best with a primary key that is an integer field auto incrementing - that way you don't even have to enter values and remember where you were up to.it has to be unique and the field I selected will be even if it does not look like it and it has to be that cause it is what I want and need LOL
Then, you want a user defined value assigned to each record; add another field defined as Text and unique - in that you can enter your specific user defined value.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Re: File structures and forms multilevel
sorry for the delay
I was able to build the tables with proper relationships - at least hope
and I build a custom form with the tables and defined the links
but still have to start testing this newcustom Form
I did follow a good video on custom form with sub form and sub sub form
which was very interesting and nicely explained.
but wondering why you need to add fields
and also table + scrolling bar
are the field needed to query the tables only?
and tables only for deleting or adding new records ?
the next thing will be 2 reports
first report will use only the last table so should be much easier
but still need to find way to make group and sum inside group
but will be back later on with that part
second report will have to use all the tables
so this might require some SQL query on 3 tables with the proper links
have to find other video tut on this subject
thanks for your patience
have a nice day
I was able to build the tables with proper relationships - at least hope
and I build a custom form with the tables and defined the links
but still have to start testing this newcustom Form
I did follow a good video on custom form with sub form and sub sub form
which was very interesting and nicely explained.
but wondering why you need to add fields
and also table + scrolling bar
are the field needed to query the tables only?
and tables only for deleting or adding new records ?
the next thing will be 2 reports
first report will use only the last table so should be much easier
but still need to find way to make group and sum inside group
but will be back later on with that part
second report will have to use all the tables
so this might require some SQL query on 3 tables with the proper links
have to find other video tut on this subject
thanks for your patience
have a nice day
Openoffice 3.1 Win 10 64 bits
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: File structures and forms multilevel
Table controls and individual field controls can do the same operations including display, edit and delete existing data or add new records. The differences are that individual controls display one record at a time while table controls can display multiple records, and a table control often has its own navigation bar while individual controls usually use the main navigation bar.
The Oracle/Sun Report Builder extension for Base provides many more options than the built in report builder. It can be downloaded from
https://extensions.openoffice.org/en/pr ... rt-builder
There is some documentation at
https://wiki.openoffice.org/wiki/SUN_Report_Builder
A search for “SQL joins tutorial” will get many choices for learning about joining multiple tables with a query.
The Oracle/Sun Report Builder extension for Base provides many more options than the built in report builder. It can be downloaded from
https://extensions.openoffice.org/en/pr ... rt-builder
There is some documentation at
https://wiki.openoffice.org/wiki/SUN_Report_Builder
A search for “SQL joins tutorial” will get many choices for learning about joining multiple tables with a query.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11