Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport Linking Problem

Status
Not open for further replies.

Jefftopia

Programmer
Jul 30, 2002
104
0
0
US
I have a main report which I am attempting to add several subreports to. The Main report is receiving data via a direct connection to an MS Access database query. I am viewing the report from VB6 using selection criteria:

WU_Rpt.SelectionFormula = "{rptQryWriteUp.WU_id} = " & txtWU_id.Text & " "

I have a subreport which has been designed using the same method as the main report. I would like to link this subreport to the main report so the subreport only shows data corresponding to whatever is being shown in the main report as a result of the Selection Formula.

I have attempted to achieve this by Inserting Subreport and linking to an identifier (WU_id) in the main report. I am then inserting the subreport in the main report details section. For some reason, when I preview the report, the subreport is not being isolated to the linking identifier (WU_id). In fact, the subreport is showing-up three times on the main report (for each record in the underlying query).

I have posted this several times with no success. It seems to be a simple problem. I have reviewed CR User's Guide extensively and can not find what it is I am doing differently.

Help Appreciated.
 
A subreport inserted into a detail section will be printed once for each detail in the main report. If you only want it once, put the subreport in a report header or footer.

The subreport record selection should be limited by the linking value if the link has been entered correctly. In the Subreport Links dialog, this field should be in the Fields to link to listbox, and when it is selected, the corresponding subreport field should be shown in the "Select data in subreport ... " box at the lower right, along with a check in the checkbox there.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top