repeating tables and recursive sections

J

JR

Hi all;

I need to create a costing table unsing Infopath 2003 that's a little more advanced than what I can do with a simple repeating table.

A repeating table would allow me to add an unlimited number of "line items" with a column for Cost. Then simply add a non-repeating field which can calculate the sum of the Cost column to give me the Grand Total. Fantastic, throw in a repeating table, and I'm done; but no.

The problem is that, theoretically, each "line item" needs to have the ability to be broken down into "sub-items". For example, a line item may be "Engineering" and the sub-items would be Civil, Electrical, Mechanical etc. These sub-items would also have a Cost associated with them. In this case, the value of Cost for the Engineering line item would be the total of the Cost columns for Civil, Electical, Mechanical, etc. Then the Cost column for Engineering would roll up to the Grand Total. I also need to prevent the Costs for the sub-items from rolling up multiple times.

Confused yet? Keep in mind, each "sub-item" needs the ability to be broken down again, and again, and again, and so on...

It looks like I could possibly use a recursive section to do this; but can't quite get it to work the way I want. Can anyone offer some suggestions or direct me to an example of something similar?

Now I know it's really easy if we just say, list the sub-items individually and you can stick with the repeating table; but that's not an option. The client is looking to replace an existing system and they want the replacement to work the same way the old one does.

Thanks in advance.

- JR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top