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

How to call back titles in a table?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
cyberjuls
General User
General User


Joined: 02 Nov 2005
Posts: 9
Location: Montpellier | France

PostPosted: Fri Jan 27, 2006 6:18 am    Post subject: How to call back titles in a table? Reply with quote

Here's my problem,

I have a document splited in three parts :

1- Generalities
2- Articles
3- Quantities

All this is document is organized on titles so i get a nice table of content at the begining of the document without problem. My problem is that the quantities are dependant of the articles. In chapter articles i have to describe technical information about composition and way of using some articles. Thus articles are changing each time i'm doing a new document.

here is an example how it looks like

4.2.1 Window A21

Steel structure
reinforced glass
color : grey
etc etc....

Now what i want is to insert a table in the third part (quantities) wich call back automaticaly in the first column the title of the articles. This is more or less the same process as an index. The only problem is i have to get this in a table, because i have to calculate quantities here and do not want to copy/paste all titles again.

Here's what i should get

|4.2.1 Window A21 | "type of unit" | "quantity" | "unit price" | "total price |
--------------------------------------------------------------------------------------
|4.2.2 Window A22 | "type of unit" | "quantity" | "unit price" | "total price |


If anyone as an idea of how to do it, it will helps a lot.

Thanks.
Back to top
View user's profile Send private message
cyberjuls
General User
General User


Joined: 02 Nov 2005
Posts: 9
Location: Montpellier | France

PostPosted: Sat Feb 04, 2006 5:59 pm    Post subject: Reply with quote

Up.

Nobody?
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


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

PostPosted: Sat Feb 04, 2006 7:30 pm    Post subject: Reply with quote

OK, I'll take a shot. When you create "4.2.1 Window A21" select it and do Insert > Bookmark.

When you create the table do Insert > Cross-reference, choose the name of the bookmark and on the right use either "Reference" or "Chapter".

I have no idea if this is what you are looking for but then apparently no one else was sure about that either.
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Sat Feb 04, 2006 9:05 pm    Post subject: Reply with quote

cyberjuls wrote:
Up.

Nobody?


If I understand you need, consider using a spreadsheet, or a simple database. With the spreadsheet you have the Lookup() function to do searches on large quantities. Databases have similarly many useful functions, more in fact on the whole.

David.
Back to top
View user's profile Send private message
DrewJensen
Super User
Super User


Joined: 06 Jul 2005
Posts: 2616
Location: Cumberland, MD

PostPosted: Sat Feb 04, 2006 10:00 pm    Post subject: Reply with quote

It looks like you are trying to create a catalogue, or inventory, or quote, or manifest? In which case then I would agree that keeping your data seperate from your presentation would be of value.

You could use a spreadsheet, I think a database would make more sense, but a spreadsheet is (can be ) a type of database.

In either case Base/Calc you would be buidling both a place to store the pieces of information, and a proceudre to 'report' this information out. In your case a writer document, generated, most likely using a template and some macros, from this informaton.

EDIT - After a few more minutes thought I have this to add.

Let's say you don't really want to get into making some kind of spreadsheet / database backend for this. You just want to make documents, that have the same type of structure each time. The data changes each time, but not the structure.

Then instead of conecntrating on the data and looking instead at the steps you need to perform to create the document.

OK here is a thought. Looking at you example I take it that the lines
Quote:

4.2.1 Window A21

Steel structure
reinforced glass
color : grey
etc etc....

is an 'Article'?

Then is the line
"4.2.1 Window A21" not of a certain paragraph style. If this paragraph style is used only for article entries then you should be able to create a macro (basic procedure) that runs over the documents text, looking for these lines. As each one is found it inserts a row into the trable ( which table is inserted, I would think, by the same macro).

It seems to me there are examples for doing this search on the forum. In fact a quick look at Andrew Pitonyak's Macro document shows an example macro that walks all of the paragraphs in a document, and reads the paragraph style name for each.

If you add all the Articles, then run a macro to generate the table it should be a reasonably straight forward to adapt the code from the example macro to this purpose (given that there is another example macro there for creating and inserting a table).

The only tricky part would be if you need to add (or delete) Articles after the table has been generated, and therefore need to keep this table in synch. As I would assume you are planning on going in and adding the values for Quantity, Price and Total Price for each line by hand.

This last step would be the true benefit of using a database for this task. Using a database to store the data and then a procedure to generate the document, the update function would be dead simple. You just update the data in the database, and regenerate the file.

Anyway, just a few thoughts.

Drew
_________________
Blog - http://baseanswers.spaces.live.com/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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