Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
Hello

I have a simple Crystal Reports project I m gonna have a simple sub-report too.
I always get "Missing Parameter Value" error.

I want to have sub report for each record of main report. I have searched a lot on the Internet for almost a week but There hasn't been any visual example or sample which includes:
(MainReport + subreport and dynamically passed parameter from main report to sub-report and then to stored procedure in SQL) all examples are programmatical manners like this answer:
rptH.Subreports[1].SetParameterValue("@your parameter name", parametervalue);
but I cant pass "parametervalue" from C# code because I want to load each record in main and pass its ID of each record to sub-report dynamically.

But I want to pass parameter from Main Report after each record loaded not from C# Code.

I'll be grateful if someone help me.

What I have tried:

I added a main report and linked it to a model. then I added a parameter field value named ID. Then I added a subreport and added my SP to It . Again I went to main and a made link to Parameter field value and SP ID.
Posted
Updated 25-Oct-21 19:33pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900