I need to pass parameters (variables) in to my document template when running a report. How do I do this? I am using the .NET version of Windward.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You pass the parameters in by attaching them to each datasource. You can set a different set of parameters and values for each datasource.
You do this by creating a WindwardInterfaces.net.windward.api.csharp.KeyPairDictionary that contains the parameters. The key is a String with the variable name. The value can be a String, Number, or DateTime. The value type should match database column types if the variable will be used as a parameter in a select.
These are set in the datasource by assigning to the IReportDataSource.Map property. AdoDataSourceImpl and XmlDataSourceImpl both implement IReportDataSource.
Note that variables are carried across datasources if multiple datasources are applied to a template. If a variable is set in the first datasource, and is not set in the second, it will retain its value from the first. If it is set in the second, that will override the saved value.