[Solved] Autonumeric column in report

Getting your data onto paper - or the web - Discussing the reports features of Base

[Solved] Autonumeric column in report

Postby mariussiuram » Fri Jul 04, 2008 10:35 am

Hi, I was trying to get a table-report from a query. The query is very simple (basically a list of names). I want to put them on a table.

The first column of the table should be autonumeric (1,2,3...) the second column the name of the person and the third column empty. I cannot achieve the autonumeric column (inserting fields doesn't work and I have done a bunch of tries without being successful).

(The table always start at number 1, 2, 3 ... and so on, the number is not a name's property)

Thanks for your help!
Last edited by mariussiuram on Sun Jul 06, 2008 10:40 pm, edited 1 time in total.
OOo 2.4.X on Ubuntu 8.x + Windows
mariussiuram
 
Posts: 3
Joined: Fri Jul 04, 2008 10:29 am

Re: Autonumeric column in report

Postby TheGurkha » Fri Jul 04, 2008 9:02 pm

If I understand your question correctly, then to achieve what you want you need to create your database, then create your three fields (plus however many other fields you are using).

Set the first field type to be BigInt and in the field properties at the bottom, set AutoValue to Yes.

Please add [Solved] to the the start of the title of your first post (use the edit button) if your question has been answered.

 Edit: I think I've missed completely the point of your question. Sorry. Let me think. 
Attachments
Database.png
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
TheGurkha
Volunteer
 
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Autonumeric column in report

Postby TheGurkha » Fri Jul 04, 2008 9:39 pm

Do you want the report to put in the numbers beside the names, incrementing by 1 each time? These are not numbers in the database, they will only appear on the report?

What is your database held in? Base, or a spreadsheet, or another database connected to Base...?
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
TheGurkha
Volunteer
 
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Autonumeric column in report

Postby mariussiuram » Sat Jul 05, 2008 3:29 pm

Gurkha, thanks and sorry for my poor english and poor explanation

Do you want the report to put in the numbers beside the names, incrementing by 1 each time? These are not numbers in the database, they will only appear on the report?


exactly, that's what I meant

It's everything inside the same .odb file. There is a "big" table, a small query (with the table) and the report I'm trying to do (uses the query fields).

I hope I explained it well... thanks for your time.
mariussiuram
 
Posts: 3
Joined: Fri Jul 04, 2008 10:29 am

Re: Autonumeric column in report

Postby TheGurkha » Sat Jul 05, 2008 3:33 pm

No worries, just wanted to check that I had it straight.

And you don't need apologise for your English, it always amazes me when non-native English speakers deal with technical matters on forums such as this.

Anyway, let me see what I can turn up.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
TheGurkha
Volunteer
 
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Autonumeric column in report

Postby TheGurkha » Sat Jul 05, 2008 5:14 pm

OK, my palindromic friend, I finally got it worked out.

In case you don't have it: Sun report Builder

Using the Sun Report Builder, open the Navigator and right-click on the Functions item.

1. Select New Function from the menu.
2. An entry titled Funtion appears in the Navigator tree below the main Functions title. Highlight this new entry. In the Properties, rename this to Counter.
3. In the Formula field enter [Counter]+1, including the '[' and ']'. In the initial value field enter 0.
4. Click the Save icon.
5. On the main menu bar click on the Text Box icon, and draw the text box on the report where the counter is to go.
6. Click on the new text box and in the Properties for it click on the Data tab.
7. In the Data Field Type drop down select the name of the new Function you created, Counter.
8. Click the Save icon again.
9. Run your report, you should see the counter incrementing as shown.

Please add [Solved] to the the start of the title of your first post (use the edit button) if your question has been answered.
Attachments
Counter Function Properties.png
Properties of the new Function called Counter, also shown in the Navigator
Text Box Properties.png
Properties of the text box referencing the new Counter variable
Text Box Properties.png (11.5 KiB) Viewed 2850 times
Report Output.png
Example report with the counter incrementing once per line
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
TheGurkha
Volunteer
 
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Autonumeric column in report

Postby mariussiuram » Sun Jul 06, 2008 10:39 pm

That looks great, I'll try it right now.

Thank you very much!
OOo 2.4.X on Ubuntu 8.x + Windows
mariussiuram
 
Posts: 3
Joined: Fri Jul 04, 2008 10:29 am


Return to Reporting

Who is online

Users browsing this forum: No registered users and 2 guests