How to?: Generate a detail report if the summary

I am trying to generate a detail report that prints the detail of records only if the summary totals <> 0 based upon a two field key. I think I need to collect the detail in an array until the key values change (up to 20 records max). Summarize the totals and decide whether or not to print the detail and summary. Does this sound like the best solution? If it does, I don’t have the first clue as to how to collect the data into an array until the key values change. help? Edited by - swinsb on 2001 Jul 06 17:57:27

Hi, You can use the repeat until loop for collecting data in the array eg. repeat Arr[1] += SomeValue; until firstvalue <> secondvalue; And for printing the Details based on the Total collected in Arr[1], use the following on the OnPreSection() trigger of the reports section which displays the Summary. if arr[1] <> 0 then CurrReport.SHOWOUTPUT(True) else CurrReport.SHOWOUTPUT(False); hope this helps. Regards Vishal

A two level same record Indented report should work for this. Set a flag in the none printing first DataItem GroupHeader to False and to True in the footer if the Amount <> 0. Then either break or print the Indented records. David Cox MindSource (UK) Limited Navision Solutions Partner Email: Web: