ReportParameter OR condition

2 posts, 0 answers
  1. Stefania
    Stefania avatar
    158 posts
    Member since:
    May 2013

    Posted 29 Feb 2016 Link to this post


    on my report  I have some report parameter (Visible = true) and I would like to avoid the report preview until at least one of those 3 parameters is been choosen.

    If it is possible I also would like to show a message to remind to the user that he has to choose at least one of those parameters

    Please, see the printscreen

    Thank you
  2. Nasko
    Nasko avatar
    1094 posts

    Posted 02 Mar 2016 Link to this post

    Hello Stefania,

    The default report parameters area provides basic functionality to the users. It is not possible to extend the default parameters area and add OR conditions or custom messages.
    In order to implement the described scenario, you will need to create your own custom report parameters UI in your application. First you will need to hide the default parameters area by setting each report parameters Visible property to False.
    Then you can create your custom parameters UI and send the values from that UI to the report parameters programmatically through the report source e.g.:
    var typeReportSource = new Telerik.Reporting.TypeReportSource();
    // Specifying the assembly qualified name of the Report class for the TypeName of the report source
    typeReportSource.TypeName = typeof(Invoice).AssemblyQualifiedName;
    // Adding the parameter values
    typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));
    typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderRetailer", "ABC555"));

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top