Need Developers Help

owlearner

Active Member
Hi All,

i want to bring the total no of childs oa and asset in a single grid row as follows

ex.

Parent Number Total No ofChilds
123 5

i suppressed all the lines in grid and using data dictionary items to display this info.
can any one help me with a sample code

thanks and regards

OWLearner
ONE WORLD XE
 
OWLearner,

I'm supplying a method rather than sample code. I hope that you can follow what I've set out below and that it will help. Please let me know how it goes.

*Parent Asset BV Section - Non conditional, non printing section (hidden or suppress section write) (Use a BV that contains F1201 data including the Parent Asset Number)
Initialize Section ER: Set user selection to select where Parent Number = Item Number
Do Section ER: Loop through Parent Asset BV accumulating any required totals. Save Parent Asset Number to be used to get Child Assets. On change of Parent Asset number, set Child Asset Counter to 0, call Child Assets BV Section, call Printing Section.

*Child Assets BV Section - Conditional, non printing section (hidden or suppress section write) (The BV used for this section could be the same as for the Parent Asset BV Section)
Initialize Section ER: Set user selection to select where Parent Number = Parent Asset Number saved in Parent Asset BV Section and Item Number <> Parent Asset Number saved in Parent Asset BV Section
Do Section ER: Loop through Child Assets BV section accumulating any required totals and counting the number of child assets.

*Printing Section - Conditional, printing section - no BV
Do Section ER: Print 1 line: Parent Asset, Number of Children, any Totals, etc.

When the printing section is complete the Parent Asset BV Section will continue with the next Parent Asset. You'll need to add any required report headers or page headers etc.

Note: The printing could be done in the Parent Asset BV Section if required. This would remove the need for the Printing Section.
 
Peter,
Thanks a lot for your reply. but i want to do this in a grid( Interacive Apllication) of find/ browse screen. your sent info is very helpful as i am doing a Batch Application too. can you plz provide the info for an Application?

Thanks and Regards
OWLearner
One World Xe
 
OWLearner,

You can apply the same methodology in the form's Grid Record is Fetched ER. But you may have to do Table IO in a while-loop to count the children.
 
Hi
Thanks a lot
i will try that and will get back to you.

Thanks and Regrads
OWLearner
 
Back
Top