| View previous topic :: View next topic |
| Author |
Message |
goa103 OOo Advocate


Joined: 11 May 2003 Posts: 279
|
Posted: Wed Aug 20, 2003 8:50 am Post subject: Create a simple Address Book manager using Data Sources |
|
|
Hello,
I want to try the Data Sources from OOo so I decided to create a very simple Address Book. However I don't know how I can update the view of my document automatically according to the table contents.
I create my dBase :
persons = first_name, last_name
I pressed F4 to display the data sources, drag my 'persons' table to my Text Document, it askes me to select the fields I want to display in a table, I select All to display both the first and last names. It works.
But when I add a new entry to my persons table, my address book, It doesn't update the table I have just created in the Text Document. I tried to right click on the table but didn't find any new features... I even tried the Tools > Update > Update All feature.
What should I do ?
JM _________________ An OOo mascot designer |
|
| Back to top |
|
 |
dfrench Moderator

Joined: 03 Mar 2003 Posts: 1605 Location: Wellington, New Zealand
|
Posted: Wed Aug 20, 2003 1:52 pm Post subject: |
|
|
| Use the forms wizard ... it will generate all the database handling code for you |
|
| Back to top |
|
 |
goa103 OOo Advocate


Joined: 11 May 2003 Posts: 279
|
Posted: Wed Aug 20, 2003 11:13 pm Post subject: |
|
|
| dfrench wrote: | | Use the forms wizard ... it will generate all the database handling code for you |
Thanks but I want to insert the "form" as a table in my current text document. The new form autopilot creates it in a new text document.
For example I would like to get something like :
| Quote: |
Here are the persons of the guestbook :
first_name | last_name
John | Smith
Jean | Dupont
Mickey | Mouse
|
I'm not sure it's possible because the table remains a table, it's not dynamic. So the thing I would like to do, it's to insert a form. But it seems we can't change the style of the form... I would like to color its heading, background cells...
Moreover I would like to create the form but myself but couldn't find any explanation about it in the manual. As you said It probably create some script but I don't know where to find it... How can I even edit it ?
Thanks,
JM _________________ An OOo mascot designer |
|
| Back to top |
|
 |
dfrench Moderator

Joined: 03 Mar 2003 Posts: 1605 Location: Wellington, New Zealand
|
Posted: Fri Aug 22, 2003 12:29 pm Post subject: |
|
|
| Quote: | Thanks but I want to insert the "form" as a table in my current text document. The new form autopilot creates it in a new text document.
| The form is just another document so you could use it as a base document or template and edit it or you can simply add a table control to your document.
| Quote: | | I'm not sure it's possible because the table remains a table, it's not dynamic. | In both cases the controls will remain linked to the underlying database table.
| Quote: | But it seems we can't change the style of the form... I would like to color its heading, background cells...
| The style of the form document is able to take any feature of a normal document including a graphic (eg .jpg background). For a table or grid control you can select a background colour for the cells in the controls properties dialog but not the column headings.
| Quote: | | I would like to create the form but myself |
You can create forms using File> autopilot> form from the menu or adding forms controls to any document using the show forms functions icon (left hand border) |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8976 Location: Lexinton, Kentucky, USA
|
Posted: Fri Aug 22, 2003 2:31 pm Post subject: |
|
|
Here's another approach to your problem. Open your dBase table in Calc then select and copy the content you want being sure to get some extra cells for additions. Move to the Writer doc and do Edit > Paste Special > DDE link. Now your W doc will update when the dbase table changes. Click in the W doc table and Format > Table to add your colors or shrink its size, etc.
To get rid of the table you must break the link with Edit > Links > Break, then delete as you normally would. |
|
| Back to top |
|
 |
goa103 OOo Advocate


Joined: 11 May 2003 Posts: 279
|
Posted: Thu Nov 06, 2003 3:42 am Post subject: |
|
|
Hello,
I forgot to thank John for his tip. I finally tried it with a budget sheet that I want to insert in a text document that will be sent to my client. The problem with the DDE link is that you can't use it if a new row is inserted in the sheet (I use a simple spreasheet document edited using Calc). I copied its contents and pasted it to Writer. I perfectly works when I update an existing row, price, item designation... But I can't insert a new item, the table updates but its last item is lost because I only asked it to "paste" n rows and not the whole spreasheet.
I would like to paste my spreadsheet as this, insert the file and "link" it to the text document.
Thanks for your help,
JM _________________ An OOo mascot designer |
|
| Back to top |
|
 |
PY Delens Guest
|
Posted: Wed Dec 03, 2003 9:47 am Post subject: Setting the font for a table control in a database form |
|
|
Likely the font settings are not available in the Control properties of a grid control, even ifthe background property is indeed availble.
My grid is seriously too small for proper typing in.
I only found a document about the Uno service 'Gridcontrol'.
See :
http://api.openoffice.org/docs/common/ref/com/sun/star/form/component/GridControl.html
Does someone know about an easier solution, or about an example snippet for setting the font property with Starbasic/UNO at the loading of the document ?
___________________________________________________
P-Y Delens, Manager
LIENTERFACES - PY Delens, sprl
Avenue Dolez, 243 - 1180 Bruxelles
phone : 32 2 375 55 62
fax : 32 2 374 75 74
mail : py.delens@lienterfaces.be
web : www.lienterfaces.be
___________________________________________________ |
|
| Back to top |
|
 |
|