GUID Parameter not passing throught to sub reports

2 posts, 0 answers
  1. Tom
    Tom avatar
    3 posts
    Member since:
    Jul 2011

    Posted 07 Jul Link to this post

    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";
    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.


  2. Tom
    Tom avatar
    3 posts
    Member since:
    Jul 2011

    Posted 07 Jul in reply to Tom Link to this post

    All sorted. Had to use CStr() on the parameter passed into the sub report reportsource.
  3. DevCraft banner
Back to Top