Ramil,
Nadya has given you good advice, by suggesting you create summary records in your report cursor. These records could have a flag marking them as summary records, so your report can respond properly. Or you could create separate cursor for the summary, and use a separate report form. Print first report, select summary cursor, print second report (without prompting the user).
HTH.
>The example you sent certainly meets my requirements except for the part where the number of unique details (or variables) are not known.
>
Steve Gibson