Crystal Report pass parameter from main to subreport

In Crystal report 2011 I have main report rptMain and  subreport SumMain .
They are linked with a field Supplier ID. In main report I have parameter Month Of Report I want to pass this parameter value to sub report.
When I go to sub report link form I see that I have supplier ID field as field to link to I am adding month of report too on the right side bellow Supplier Id and everything looks ok.
In sub report when I create formula and in that formula use parameter ?Month of Report I got error “This field name is not known” and parameter field is highlighted.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

When you add the parameter to the linking do you see a box on the lower left?
Select the ?pm parameter it suggests then check the check box to filter the data based on that and choose you date field.  

The subreport will now have a filter based on the date field which you can edit if necessary.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TarasAuthor Commented:
Thaks a lot it was typo in sub report formula name of parameter is not the same as in main report.
I copied formula from main report and there parameter name is:   {?Month Of Report}  but in subreport it is:{?Pm-?Month of Report}
If you let CR create the subreport parameter, it puts "Pm-" at the beginning of the name.  You can avoid that by creating the subreport parameter yourself.  For example, edit the subreport and create a parameter named "Month of Report", and use that parameter in the subreport's record selection formula (and anywhere else it's needed).  Then you can link the {?Month of Report} parameter in the main report to the {?Month of Report} parameter in the subreport.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.