Auto-incremental Serial Numbers into SRB

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

Auto-incremental Serial Numbers into SRB

Postby gandonov » Wed Oct 15, 2008 1:02 pm

Hello,

I created a simple invoicing system (using OOo Base) for internal use.
But I'm facing few problems and I need your advice.

#1 question: Serial Numbers in SUN Report Builder
I want to have auto-increment Serial Number on every invoice.
I have the following kind of invoice:
Invoice #_Serial_Number_#
- Company_1 (grouping)
--- Office_1 (grouping)
----- item_1 ...
----- item_2 ...
----- ... ...
--- Office_2 (grouping)
----- item_1 ...
----- item_2 ...
----- ... ...
- Total ... ...

So, I created a function[SN] in Report Navigator->Report->Functions.
Formula: [SN]+1
Initial value: 1234

I created a text-field(in Company's_Header) in order to display the value of [SN].

It's working. I have incremental serial numbers, but the function is incrementing on every office' group! Not on Company' group!

... any idea how to solve this?

(I tried with "Counter" on group level, but in this case the counter is incrementing on every "item")

#2 question: How to pass a parameter to the report? (SUN Report Builder)
I want pass the "Initial value" for [SN] function.

Thank you in advance.
OOo 2.4.X on Ubuntu 8.x
gandonov
 
Posts: 4
Joined: Thu Oct 09, 2008 12:54 pm
Location: Sofia, Bulgaria

Re: auto-incremental Serial Numbers into SRB

Postby QuazzieEvil » Wed Oct 15, 2008 6:33 pm

The counter depends in the scope where it was defined. You may consider changing scopes. Not sure about your particular need, but you may be better of generating the number on the table side, rather than the report.
QuazzieEvil
Volunteer
 
Posts: 283
Joined: Tue Dec 04, 2007 6:38 pm
Location: Houston, TX

Re: auto-incremental Serial Numbers into SRB

Postby gandonov » Thu Oct 16, 2008 9:05 am

Hello QuazzieEvil,

Yes. I tried to use Functions and Counters defined in different scopes, but with unpredictable results:
(See the red arrows on the attached image.)
(Function at report scope)... is incrementing on every office' group! Not on Company' group! ...
... I tried with "Counter" on group level, but in this case the counter is incrementing on every "item"...


Do you have an idea how to send new "Initial value" for a function? (See the blue arrow on the attached image.)
Report_Functions.png
Functions and Counters in SRB


P.S. About your idea, to put Serial Numbers into initial table:
- I want only to print Serial Number on the hardcopy of the Invoice. I don't want to store them.
OOo 2.4.X on Ubuntu 8.x
gandonov
 
Posts: 4
Joined: Thu Oct 09, 2008 12:54 pm
Location: Sofia, Bulgaria


Return to Reporting

Who is online

Users browsing this forum: No registered users and 2 guests