Skip to Content
Former Member
May 08, 2007 at 05:06 PM

Passing data from sub-report to main?????


Post Author: tazer98

CA Forum: General

Hello All,

Iu2019m writing a report that I need to pass data from a sub-report to the main report. Iu2019ve gone along with what the books suggest, but I canu2019t get it to work for me. Please help.

Using CR version 10. Linked sub-report.

Sub-report is placed in group level section. Group level section may be suppressed. I want to use the returned variable u201CLotCodeFromSRu201D (which I assumed would be in u201CprtLotCodeu201D see below) in detail line printing. It comes up blank. I do not want any printing to come from the sub-report.

The sub-report links to some tables and reads several records, selecting one out of the group, based on a condition. Then the u201CLotCodeu201D formula assigns the shared variable u201CLotCodeFromSRu201D with the selected data.

Main Report:

Formula: prtLotCode


Shared StringVar LotCodeFromSR;



Formula: LotCode


Shared StringVar LotCodeFromSR := NotesTbl.Line

Can anyone see what Iu2019m doing wrong or where my logic has gone awry? Where do I place the sub-report on the main report? Can that section be suppressed? Anything special in the sub-report?