Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   Tools Development (http://www.baanboard.com/baanboard/forumdisplay.php?f=8)
-   -   after.field based on multiple column values (http://www.baanboard.com/baanboard/showthread.php?t=70582)

lotius81 14th November 2017 19:24

after.field based on multiple column values
 
Is it possible to do an after.field section that is based on multiple column values?

I have an order number and an order line number. I'd like to display a layout when the combination of those 2 values changes.

What I'm trying to accomplish is this.. Right now we have a report that displays certain sales order delivery lines depending on what selection criteria they use. It's sorted by order number, order line number, and then item. However, if certain lines from those sales order delivery lines have multiple different delivery lines for the same item they'd like this particular report to roll up the quantities for that item into 1 line.

Any suggestions on a good way to approach this?

mark_h 14th November 2017 20:20

I have done something like this 2 different ways - in 1 case what I did was I just created a report which printed the details. Then I created a second report which only printed totals - so basically I just added the header and one after field layout (this was based of the last of my sorted fields) - so 1 item and 1 deliver would print the total. Then 1 item with multiple deliveries got a totaled value. The only problem with this is things like deliver date had to be removed. In my case it was not sales reports but around SFC planning.

The second way I did this was to just change the session script to pass only the totals for each line. Basically I got the orders and lines, then just ran some functions to total the values and then did a rprt_send().

Not sure if this helps or I am misunderstanding the requirement.

lotius81 15th November 2017 15:01

I think what they want to see in this case instead of a subtotal or total line is for the detail lines themselves to be rolled up into a single one. So if an order/position number combination had multiple delivery lines instead of showing 4 different lines with a quantity of 1 they'd want to see 1 line with a quantity of 4.

mark_h 15th November 2017 22:03

That is what I was thinking with the reports - basically I created a report that showed order - line - qty for the details. Then I copied the report to a new report - added sort fields, and put in an after.field layout on the line. Then the total for qty. I would run that to get it to look like I wanted in the after field layout. Then just delete the detail.layout from the report. Then when you ran it all you got was the total layout with everything needed in it.

bhushanchanda 16th November 2017 12:42

I am not completely sure about the requirement here. But, since the question is about using multiple column values in after.field, yes, there is a way.

What I did was, use a string variable say, e.g. comb.f, now, concatenate all the values you need and assign it to this field. Now, use this field on your report layout as after.field.

It has worked for me, so why not give it a try.

lotius81 16th November 2017 15:01

I think I'll do a combination of both your suggestions. Concat all values and use as a sorted input field, then display only that as an after.field. Should work nicely. Thanks, guys!


All times are GMT +2. The time now is 06:44.


vB.Sponsors
©2001-2017 - Baanboard.com - Baanforums.com