Crystal Reports Dynamic Parameter

1

Help someone.

I have a Crystal Report (CR) that prompts for an acct number. The main report data source uses a sql view to take the acct number input and look up the information it needs to print on the report, including an internal person id number. This internal person id number is also used as input to feed a parameter for a sub report whose data source is another sql view (I needed to change this sub report view). This sub report has a record selection formula that says take the internal person id number derived from the main report view results and use it to look up the sub report information. This report and sub report work fine and when I run the report it only prompts for the acct number.

I copied the main report to a new report and copied the sub report sql view and revised it to pull all the exact same fields which are all visible in Field Explorer. I updated the data source on the sub report to be the new view/sql and it pulls in all the same expected columns into Field Explorer. I also revised the parameter/record selection formula used by the sub report to be sure it is using the new sql/view data source for it's formula. Now when I run the main report it adds a new prompt to ask for an internal person id number it should've been able to retrieve using the results returned from the main report sql/view but for some reason it isn't pulling this in. I'm not sure what else could be wrong. It shouldn't be prompting for the internal person id number because the user would never know this.

maggief83

Posted 2015-07-16T16:26:59.170

Reputation: 23

1I'm not sure if I'm understanding this correctly. It is prompting for the parameter in the subreport? Try right clicking on the subreport while in the main report. Then choose Change Subreport Links... Now link the fields as they were before. – MC10 – 2015-07-16T16:30:17.400

Let me know if you still have problems with it or if I should post the comment info as a formal answer. – MC10 – 2015-07-16T18:52:26.103

that was exactly what it was!!! Wow, you understood my issue exactly. – maggief83 – 2015-07-16T19:40:13.497

yes, post as formal answer. thank you very much! how do I give you a kudo? – maggief83 – 2015-07-16T19:42:59.260

Btw, you can click the check mark next to the answer to mark it as correct. – MC10 – 2015-08-03T22:27:14.323

Answers

1

If it is prompting for a parameter in the subreport, it didn't get the input that it is looking for.

Right click on the subreport in the main report. Choose "Change Subreport Links..." and then link the field from the main report to the one in the subreport.

MC10

Posted 2015-07-16T16:26:59.170

Reputation: 7 590