OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Create a simple Address Book manager using Data Sources

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
goa103
OOo Advocate
OOo Advocate


Joined: 11 May 2003
Posts: 279

PostPosted: Wed Aug 20, 2003 8:50 am    Post subject: Create a simple Address Book manager using Data Sources Reply with quote

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
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Wed Aug 20, 2003 1:52 pm    Post subject: Reply with quote

Use the forms wizard ... it will generate all the database handling code for you
Back to top
View user's profile Send private message
goa103
OOo Advocate
OOo Advocate


Joined: 11 May 2003
Posts: 279

PostPosted: Wed Aug 20, 2003 11:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Fri Aug 22, 2003 12:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Fri Aug 22, 2003 2:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
goa103
OOo Advocate
OOo Advocate


Joined: 11 May 2003
Posts: 279

PostPosted: Thu Nov 06, 2003 3:42 am    Post subject: Reply with quote

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
View user's profile Send private message
PY Delens
Guest





PostPosted: Wed Dec 03, 2003 9:47 am    Post subject: Setting the font for a table control in a database form Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group