Crystal for VS2013- main report not passing param to linked subreport

649 Views Asked by At

I have a report, and a linked subreport. The subreport is linked on a field on the main report.

A field in the main report should link to the subreport at run-time, but when I run it, keep on getting the prompt "Enter parameter values".

The field in the main report is linked to the subreport using the automatic parameter name in the subreport, and have the "select data in the subreport based on field" checked, and the corresponding field in the subreport (shown in the attachment).

I am using Crystal for VS 2013.

This is a winform application.

What am I missing?

1

There are 1 best solutions below

0
On

I seemed to have the same issue under the same parameters you described. Moreover, while debugging, the winforms app would throw a COM exception. Context switching between VS and the report would reveal the prompt for the subreport parameters (which should have been linked).

An hour of exploring and trial-and-error later, here is how I managed to resolve the issue in VS2013:

  1. On your main report, right-click the subreport and select 'Change Subreport Links...'
  2. Ensure that you have the correct subreport selected, the move across any missing parameters from the 'Available fields' box
  3. For each item you move across, ensure that you have the correct subreport parameter selected in the 'Subreport parameters field to use' drop down list. For parameters, this will generally take the form '?@ParamName'

That got the report working for me again. I hope you have some luck with it!