This is a migrated thread and some comments may be shown as answers.

GUID Parameter not passing throught to sub reports

1 Answer 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 07 Jul 2016, 11:19 AM

I'm trying to output a report from a web application. It's a certificate. Have put the report together and there's batch of these in one output. There's a also 4 sub reports in the main report and I'm passing the main primary key (ObjectID) as parameters to each sub report. So I'm using a filter as follows to the main report:

Telerik.Reporting.Filter filter1 = new Telerik.Reporting.Filter();
filter1.Expression = filterExpression;
filter1.Operator = Telerik.Reporting.FilterOperator.Equal;
filter1.Value = "=True";
certificate.Filters.Add(filter1);
And the filter expression (filterExpression) looks like:

Field.ObjectID = 'rururu9-r84848ue-ririri-rroo' OR Field.ObjectID='094949o4-494949-o49494lkkd9e9-e9e9e' and so on. Obviously those are not correctly formatted or valid GUIDs and only samples.

When I run the report I get the following error. InnerException = {"Invalid value of report parameter 'ObjectID'."}. If I remove the parameters passed through to the sub reports, it works fine - I see the reports and only the reports I want so the filter is working. Each sub report has a parameter called ObjectID and it is linked to the sub report as ObjectID = Field.ObjectID.

Any ideas on why the link and parameters passing doesn't work.

 

1 Answer, 1 is accepted

Sort by
0
Tom
Top achievements
Rank 1
answered on 07 Jul 2016, 11:30 PM
All sorted. Had to use CStr() on the parameter passed into the sub report reportsource.
Tags
General Discussions
Asked by
Tom
Top achievements
Rank 1
Answers by
Tom
Top achievements
Rank 1
Share this question
or