on 02-20-2014 5:42 PM
I'm trying to parametrize what is essentially a query in a sub-report from the main report.
I need to pass a string "%Drug%" from the main report.
I've created parameters in the main and sub reports and the formula in the sub-report which is "{field} like {parameter}".
The code in VB is:
Dim paramV = New CrystalDecisions.Shared.ParameterDiscreteValue | |
paramV.Value = "%Drug%" | |
UCRpt.ParameterFields(1).CurrentValues.Add(paramV) | |
UCRpt.SetParameterValue(0, paramV, "Subreport4") |
Where the last line is (from what I've read) supposed to populate my sub-report parameter.
I've also tried using the customize link to get the value from main to sub.
The error I got before adding the last line was "Missing parameter". After adding the last line I get an error on the code that the index is bad.
According to what I can glean the last line is referencing parameter (0) in the named sub-report.
(Attached images of parameters and linkages)
I gave up on this and decided to use a filtered dataset, which is actually working, sort of. I've got the data I want visible in the xml dump, but now I'm getting prompted to log into the database. The dataset object is identical to the dataset xsd, so I'm not sure what it's unhappy about.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.