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

ReportParameter OR condition

1 Answer 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stefania
Top achievements
Rank 2
Stefania asked on 29 Feb 2016, 09:24 AM

Hi,

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

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 02 Mar 2016, 11:22 AM
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"));
...


Regards,
Nasko
Telerik
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
Tags
General Discussions
Asked by
Stefania
Top achievements
Rank 2
Answers by
Nasko
Telerik team
Share this question
or