Report Builder - summing a formula

Discussion forum about all things Report Builder (all versions).
bfanguy
United States of America
Posts: 21
Joined: 02 May 2018, 17:48
Location: Houma, USA

Report Builder - summing a formula

Post by bfanguy » 19 Dec 2008, 14:41

I am trying to create a sum of a formula - is this possible?

what I need is the following:
I need to show an invoice for the following:

Line 1 Qty 4 Desc with no prices
Line 2 Qty 8 Desc w / price (I need to hide this line)
Line 3 Qty 4 Desc w / price (I need to hide this line)
Subtotals Need the Qty from Line 1 and the Sum of all lines with prices (I have this piece working), i just can't figure out how to get the Qty from line 1 on my subtotal line.

Tried creating a formula that only only shows the qty on line one and then i tried suming the formula - it tells me I can only sum input items and that is not an option.

thanks in advance

Jeff Luther

Re: Report Builder - summing a formula

Post by Jeff Luther » 19 Dec 2008, 14:55

Sorry, kind of can't visualize what you're after, not in words only. Some thoughts:
"i just can't figure out how to get the Qty from line 1 on my subtotal line" -- you mean 'line' as in a line in the report, or 'line' as in 'bottom line' of an equation? If line in the report, then you can display an input item, formula, etc. in > 1 place in your report, so you can display "Qty" in > 1 place.

In general, you can sum or compute values from any/all of 3 places I can think of:
* the report QRP as you are attempting using the formula editor;

* in your TD app. itself and that sum value (aka a 'computed value') can then be another input item in the report;

* via the database query itself, using (in SQLBase) sum(), count(), + @ functions, etc. selecting those into into vars in your app. and then on to the report.

Otherwise, we'd need to see some sample data, text version of the layout, formulas you are writing. As I recall you cannot have nested formulas. Is that the issue? If so, you might still be able to duplicate the body of Formula1 as a parameter to Formula2. Maybe...

bfanguy
United States of America
Posts: 21
Joined: 02 May 2018, 17:48
Location: Houma, USA

Re: Report Builder - summing a formula

Post by bfanguy » 22 Dec 2008, 08:43

Thanks for the reply Jeff,

Lets see if I can be a little clearer:
I have to create an Invoice that subtotals (and hides detail line items) based on a flag from an input variable, that uses the first detail lines quantity to calculate an each for the subtotal.
Clear as mud, i know.

I have attached a document that shows the input data and the output data and a better explaniation.

Again, thank you in advance,

Brent Fanguy
You do not have the required permissions to view the files attached to this post.

Jeff Luther

Re: Report Builder - summing a formula

Post by Jeff Luther » 22 Dec 2008, 10:24

Thanks the snapshot, but sorry, there's not enough there to give you an answer and the image doesn't expand large enought. Since you say in the text at bottom of attachment "- but I can subtotal a formula" I assume you mean cannot... right??

All I can suggest is that you apply what I originally wrote -- the In general, you can sum or compute values from any/all of 3 places I can think of: list -- to your problem. If you cannot subtotal a formula, then you need the results of the formula to be 'outside' RB -- another input item calc'ed from inside your TD app. -- and subtotal that input item. (That's an example of using my method "in your TD app. itself" to solve your issue.)

bfanguy
United States of America
Posts: 21
Joined: 02 May 2018, 17:48
Location: Houma, USA

Re: Report Builder - summing a formula

Post by bfanguy » 22 Dec 2008, 11:36

I figured it out. I had to create a new total field on the subtotal line

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests