cancel
Showing results for 
Search instead for 
Did you mean: 

Subtotals by Document Number in a Table

bryan_cain
Contributor
0 Kudos

Hi all,

I'm trying to create an output document using the livecycle designer. In this document, I have defined a table that will contain sales order information. The data in the table is at the Item Level. I need to create a subtotal row in the table for each Sales Order, similar to the At End Of construct in ABAP.

Any pointers on how I might accomplish this?

This is in an ECC 6.0 System, and I am using LiveCycle Designer 7.1

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Bryan,

Create a TextField in the Adobe form where ever you want to have the sub total and create the calculate method using formCalc as follows.

sum(Table1.Row1[].Amount[])

Here Amount is the name of the sales item amount field. Replace it with your variable name. Similarly the Table1 variable name.

Thanks!

Surya

Edited by: V. Surya on Feb 4, 2008 5:23 PM

bryan_cain
Contributor
0 Kudos

Hi, thanks for your response.

I think you're misunderstanding my requirement. I need to create a subtotal line by Doc number. For example, if my data looked like this:

Doc No | Item No | $ Amt

1234 | 0010 | 10

1234 | 0020 | 20

5678 | 0010 | 30

5678 | 0020 | 40

I need to display a subtotal line for each order in the table, like so:

1234 | 0010 | 10

1234 | 0020 | 20

subtotal 30

5678 | 0010 | 30

5678 | 0020 | 40

subtotal 70

total 100

I understand how to get the total line - I don't understand how to create the subtotal lines.

Thanks again

Former Member
0 Kudos

Hi Bryan,

I am trying to achieve something similar to this. I think the answer lies within the nesting of the table information. Have you considered this possible solution at all? I am trying to work through the help on grouping information in a table. The best I've managed so far is to have the data sorted by the key field by putting in a control level on this field in the context view.

Regards,

Grant

Edited by: Grant Peterson on Feb 15, 2008 4:22 PM

Former Member
0 Kudos

Hi,

Try to implement Grant's solution.Also you can try below alternative method.

Design the hierachy as below.


 Table
   |----Data
         |---Fields subfor---> No binding
         |         |---Field1
         |         |---Field2
         |         |---Field3
         |
         |---Subtotal subform-> No binding
                   |--Field4
                   |--Field5---> invisible

On data subform write script to hide the subform subtotal, with condition " currect record field1 == Next record field1".

And using script on field 5 add the amount to Field5 ( Field5 = Field5 + current record amount ).

When "currect record field1 <> Next record field1" display the subtotal subform.Using the script assign the value of Field5 to Field4 and in the next line of script make Field5 value as zero.

Thanks and regards,

pavan meda

bryan_cain
Contributor
0 Kudos

Thanks Pavan, that's just about exactly what I was looking for.

Former Member
0 Kudos

Hi Bryan Cain

regarding subtoal the same way i tried. But it not working for me.

Kindly can u able to share ur java script or form calc syntax or coding

thanks

sathyadeep

Answers (0)