

- #Pass variable to stimulsoft report how to
- #Pass variable to stimulsoft report software
- #Pass variable to stimulsoft report code
There are two ways how to do this from code.
#Pass variable to stimulsoft report code
Values to variables can be set from code or by request from the user. More information about this can be found in our documentation.

Before you will use any variable, you should add it to the data dictionary. All variables are stored in the data dictionary.

The variables can be of different types such as string, date, time, array, collection, range etc. The Variable provides an ability of placing and using a variable when creating reports. In Stimulsoft Reports you can use Variables in the report.
#Pass variable to stimulsoft report software
Working with parameters in Stimulsoft Reports software is similar to the parameters in the. More information about it can you read in our documentation.Īlso you can create parameters from the code: The object Parameter can be used only together with SQL data sources. For example, you can create a query with parameters when it is required to use some values in the query during every execution of this query. It is used to pass additional information into the query for selecting data. When you create a query you can use Parameter. One of the ways to get only required data is using parameters. This also allows requesting only required data, fields, registers etc. If your report is bound to an object data source, skip the Configure Report Parameters and Filters and Create Subreport Parameter Binding steps.Using the SQL queries helps avoiding the data duplication in the tables and provides maximum flexibility when searching and showing the data in a database. View Example: Reporting for WinForms - Master-Detail Report Based on a Subreportįor information on how to make the detail sections collapse or expand when you click them in Print Preview, review the following help topic: Create Drill-Down Reports. Switch to the Preview tab to preview the report: To remove blank space when the height of the subreport exceeds the height of its contents, enable the CanShrink setting: In the binding properties list, specify the data field to which you want to bind a subreport parameter, and the name of the parameter that you want to bind: In the Parameter Bindings Collection Editor, click Add to add a new binding. For this, in the subreport’s smart tag, select Edit Parameter Bindings to invoke the Parameter Bindings Collection Editor: You should bind the subreport’s CatID parameter, used as a filter for the master report’s CategoryID data field, to the main report’s data field. Set the ReportSource property of the XRSubreport control to DetailReport.Ĭreate a subreport parameter binding. 23.1: Report Controls Toolbox tab onto the Detail band: Open the MasterReport.cs report file in the Visual Studio Designer, and drop the XRSubreport control from the DX. To do this, click the icon next to the equal sign until it turns into a question mark, and select the CatID parameter:

In the invoked FilterString Editor, build an expression that compares the CategoryID data field to the CatID parameter. In the report’s smart tag, click the ellipsis button next to the XtraReportBase.FilterString property editor. Set the Parameter.Name property to CatID, Parameter.Type to Number (32-bit integer), and Parameter.Visible to False ( No): For this, right-click the Parameters section in the Field List and select Add Parameter: Multiple selected fields generate the XRTable control with cells bound to data.Īdd a report parameter to the report. Drag the fields and drop them onto the report’s Detail band: Hold the Ctrl key and select the ProductName and UnitPrice fields in the Field List window. The CategoryName and Description fields become data-bound XRLabel controls, and the Picture field creates the XRPictureBox control when dropped onto the report band:Ĭreate a new blank report named DetailReport.īind the report to the Products table of the sample Northwind database. Create a Master ReportĬreate a new blank report named MasterReport.īind the report to the Categories table of the sample Northwind database.ĭrag data fields from the Field List window and drop them onto the report’s Detail band. NET Application section explains how to create a reporting application on different platforms). To get started with this tutorial, open an existing reporting application or create a new application (the Add a Report to Your. If your report is bound to an object data source, review the following section: Object Data Source Specifics.
