Subreport & Parameter Query

  • Thread starter Thread starter Claire
  • Start date Start date
C

Claire

Hi:

I use a parameter query to obtain the data for my parent report. I need the
subreport in the report footer of the parent to also adhere to the input
criteria.

At the moment the subreport is only returning data for the last record that
meets the criteria...for example....Criteria is: LA, report returns LAR LAS
and LAT. LAT is the last code listed so the subreport only returns data for
the LAT records and ignores LAR and LAS.

I have tried working with the Master and Child Link fields, but to no avail.
I have also added a reference to the criteria in the parameter query to the
subreport SQL statement. No luck.

Can somebody solve this problem?

Thanks
Claire
 
Hi Claire

As you found, the LinkMasterFields/LinkChildFields cannot work with wildcard
characters.

The simplest solution might be to create a form where the user can enter the
paramters for the main report. In the Critiera of the main report's query,
enter:
Like [Forms].[MyForm].[MyTextBox] & "*"
in place of the existing criteria name. Do the same in the subreport's
query. Leave the form open in the background, and the subreport will read
the criteria from the form as well. You can then delete the entries in the
LinkMasterFields/LinkChildFields
 
Brilliant. Thanks Allen, I will give it a try.

C.

Hi Claire

As you found, the LinkMasterFields/LinkChildFields cannot work with wildcard
characters.

The simplest solution might be to create a form where the user can enter the
paramters for the main report. In the Critiera of the main report's query,
enter:
Like [Forms].[MyForm].[MyTextBox] & "*"
in place of the existing criteria name. Do the same in the subreport's
query. Leave the form open in the background, and the subreport will read
the criteria from the form as well. You can then delete the entries in the
LinkMasterFields/LinkChildFields
 
Back
Top