You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-a-database.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ This tutorial demonstrates how to bind a report to a hierarchical data source an
45
45
>
46
46
> Although it is also possible to join different tables within a single query, creating hierarchical data sources is preferred in most cases to provide better performance (in general, master-detail reports are generated faster than similar-looking reports created by grouping "flat" data sources).
47
47
48
-
Click **Finish** to complete the **Data Source Wizard**. If the selected queries or stored procedures contain any [parameters](../shape-report-data/use-report-parameters/query-parameters.md), you can go to the [next wizard page](../report-designer-tools/data-source-wizard/connect-to-a-database/configure-query-parameters.md) and define their values.
48
+
Click **Finish** to complete the **Data Source Wizard**. If the selected queries or stored procedures contain any [parameters](specify-query-parameters.md), you can go to the [next wizard page](../report-designer-tools/data-source-wizard/connect-to-a-database/configure-query-parameters.md) and define their values.
49
49
50
50
The newly created SQL data source will be displayed in the **Components** node of the [Report Explorer](../report-designer-tools/ui-panels/report-explorer.md). Additionally, the hierarchy of the data source will be reflected by the [Field List](../report-designer-tools/ui-panels/field-list.md). In both panels, you can right-click the data source to access its settings.
Copy file name to clipboardExpand all lines: interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-a-stored-procedure.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This tutorial demonstrates how to bind a report to a stored procedure provided b
27
27
6. On the next page, you can choose which tables, views and/or stored procedures to add to the report. Expand the **Stored Procedures** category, select the required stored procedure from the list of available stored procedures and click **Next**.
7. Then, the wizard generates query parameters for each stored procedure parameter. The next wizard page presents the generated query parameters. You can assign a static value or an expression to a parameter. In addition, you can map a report parameter to a query parameter. This is helpful when you specify parameter values in the report's Preview. For details on how to configure query parameters, refer to the [Use Query Parameters](../shape-report-data/use-report-parameters/query-parameters.md) topic.
30
+
7. Then, the wizard generates query parameters for each stored procedure parameter. The next wizard page presents the generated query parameters. You can assign a static value or an expression to a parameter. In addition, you can map a report parameter to a query parameter. This is helpful when you specify parameter values in the report's Preview. For details on how to configure query parameters, refer to the [Specify Query Parameters](specify-query-parameters.md) topic.
31
31
32
32
Click the **Preview** button and select a query to preview the result of the stored procedure execution with the specified parameters.
Copy file name to clipboardExpand all lines: interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-json-data.md
+38-11Lines changed: 38 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: 'Bind a Report to JSON Data'
4
4
5
5
# Bind a Report to JSON Data
6
6
7
-
This topic describes how to bind a report to JSON data at design time.
7
+
This topic describes how to bind a report to JSON data.
8
8
9
9
## Create JsonDataSource
10
10
@@ -23,29 +23,58 @@ This topic describes how to bind a report to JSON data at design time.
23
23
> [!Note]
24
24
> The Report Designer's Report Wizard provides the JSON option if the application has a reference to the open-source Newtonsoft.Json library.
25
25
26
-
4. The next wizard page allows you to specify the location of the JSON-formatted data:
26
+
4. The next wizard page allows you to specify a Web Service Endpoint, a filename, or a string with JSON data. In this example, the JSON data is obtained from a [JSON sample data location](https://northwind.now.sh/api/customers).
27
27
28
-
- Web Service Endpoint URI
28
+
-Choose **Web Service Endpoint** and specify the endpoint data.
-Choose **JSON File** and specify the JSON file location.
33
33
34
34

35
35
36
-
- String with JSON Content
36
+
-Choose **JSON String** and provide the JSON data string.
37
37
38
38

39
39
40
-
If you choose the **Web Service Endpoint** option, you can configure a connection string on the next wizard pages.
40
+
If you choose the **Web Service Endpoint** option, you can configure a web service endpoint, URI path parameters, query parameters, and header parameters.
41
41
42
-
4.1. Specify request parameters.
42
+
4.1. Specify path parameters and query parameters.
> Specify the Basic HTTP Authentication parameters or header parameters to access JSON data.
46
+
You can enable the new parameter's **Expression** property and [use expressions](../use-expressions.md) to set path parameter and query parameter values.
47
+
48
+
- Select **Expression Editor** from the Value property's drop-down list, specify the expression in the invoked [Expression Editor](../use-expressions.md#expression-editor), and click **OK**.
- Expressions can include [report parameters](../shape-report-data/use-report-parameters.md). Select **New Report Parameter** from the **Value** property's drop-down list, configure the report parameter in the invoked **Report Parameter** dialog, and click **OK**.
> The Data Source Wizard sends a request to the endpoint with the specified parameters to populate the data source and build the data source schema. Ensure that the parameters are always set to the values that the endpoint expects. Otherwise, the Data Source Wizard generates an error on the next steps.
58
+
> For instance, if a user specifies the name of a JSON file in a parameter, specify the default file name in order to avoid the *File Not Found* error.
59
+
60
+
Path parameters and query parameters are included in endpoint requests in the same order as they are listed. Move a parameter up or down in the list to change its position in endpoint requests.
61
+
62
+
The **Resulting URI** read-only field shows how the resulting JSON URI looks.
Click **Next** to proceed to the Wizard's next page.
67
+
68
+
4.2. Configure the Basic HTTP Authentication credentials and HTTP header parameters. Use the same steps as in P.4.1. above to configure a header parameter.
4.3. Choose whether to save the created connection string to the application's configuration file. If not, the connection parameters are saved to the report's definition.
> If the path parameters, query parameters, and header parameters you specified do not contain sensitive data, you can save them along with the connection parameters. Otherwise, the path parameters, query parameters, and header parameters are used once to retrieve JSON data to an object in memory. This object is accessible until you close the Report Designer.
49
78
50
79
5. On the next page, the wizard shows the specified JSON data's structure. You can choose all nodes or a subset of nodes.
51
80
@@ -57,12 +86,10 @@ This topic describes how to bind a report to JSON data at design time.
After you finish the wizard, it creates the **JsonDataSource** component. This component retrieves the checked data fields that the selected JSON element includes. The [Field List](..\report-designer-tools\ui-panels\field-list.md) reflects the data source structure.
Right-click the **JsonDataSource** component in the Field List or Report Explorer and choose **Edit...**. Specify another JSON data location and reconfigure data fields in the invoked wizard.
This document provides information on query parameters and describes how to use parameterized SQL queries to filter data at data source level.
7
+
This document provides general information on query parameters and describes common ways of utilizing parametrized SQL queries to filter data at the data source level.
A query parameter holds an external value that is inserted into an SQL statement before query execution. This value can be static or an associated expression can generate it dynamically.
10
+
A query parameter holds an external value that is inserted into an SQL statement before query execution. This value can be either static or dynamically generated by an associated expression.
11
11
12
12
The query parameter value is inserted into the resulting SQL query string in the "\@QueryParameterName" placeholder's position.
13
13
14
14
Query parameters are used in the following scenarios:
15
15
16
-
* When filtering report data at the data source level using the [Query Builder](../../report-designer-tools/query-builder.md).
16
+
* When filtering report data at the data source level using the [Query Builder](../report-designer-tools/query-builder.md).
17
17
18
-
The Query Builder helps you construct SQL queries when creating a new data-bound report or [binding an existing report to an SQL data source](../../bind-to-data/bind-a-report-to-a-database.md),
18
+
The Query Builder helps you construct SQL queries when creating a new data-bound report or [binding an existing report to an SQL data source](bind-a-report-to-a-database.md),
The criteria based on the specified query parameters are added as an SQL statement's WHERE part.
35
35
36
-
* When [binding a report to a stored procedure](../../bind-to-data/bind-a-report-to-a-stored-procedure.md) provided by an SQL data source.
36
+
* When [binding a report to a stored procedure](bind-a-report-to-a-stored-procedure.md) provided by an SQL data source.
37
37
38
38
The Report Wizard, as well as the Data Source Wizard, include the **Create a query or select a stored procedure** page. If you select a stored procedure, the wizard creates a query parameter for each procedure parameter and allows you to configure the query parameters in the next **Configure query parameters and preview the result** page.
You can access query parameters using the **Parameters** property of the query the report's **SqlDataSource** component exposes. These parameters include the ones you created within the Query Builder or that were generated for the data source's stored procedure. You can also access the query’s filter string using the **Filter String** property. This filter string includes the filter that you specified in the Query Builder.
You can add new query parameters in the Query Parameters dialog and modify the filter within the Filter Editor.
47
47
@@ -51,7 +51,7 @@ The following properties are available for each query parameter:
51
51
***Name** - specifies the parameter's name.
52
52
***Type** - specifies the parameter value's data type.
53
53
***Expression** - determines whether the actual parameter value is static or generated dynamically.
54
-
***Value** - determines the query parameter's actual value. If the **Expression** option is enabled, the actual parameter value is produced dynamically by calculating an associated expression. This is useful when you map the query parameter value to the [report parameter](parameters-overview.md) value. Refer to the next document section for more information.
54
+
***Value** - determines the query parameter's actual value. If the **Expression** option is enabled, the actual parameter value is produced dynamically by calculating an associated expression. This is useful when you map the query parameter value to the [report parameter](../shape-report-data/use-report-parameters.md) value. Refer to the next document section for more information.
55
55
56
56
## <aname="providevalue"></a>Provide the Query Parameter Value
57
57
Below, you can see how a value is specified for a query parameter within the Data Source Wizard's page. You can also specify query parameter values in the Report Wizard or the Query Parameters dialog in the same way.
@@ -60,7 +60,7 @@ Below, you can see how a value is specified for a query parameter within the Dat
60
60
61
61
Choose a query parameter's value type and set a static value to the **Value** property according to the selected type.
Specify report parameter settings in the invoked **Report Parameter** dialog. Remember to specify the report parameter type according to the type of the corresponding query parameter. Click **OK** to exit the dialog.
* Map a report parameter that already exists in a report to a query parameter by expanding the **Value** property's drop-down list and selecting the parameter you want to use. An appropriate expression string is generated automatically.
## <aname="PassMultiValueParameterValueToQuery"></a>Pass a Multi-Value Parameter Value to a Query
92
-
You can map [multi-value parameters](multi-value-and-cascading-parameters.md) to query parameters. For instance, the following query selects the orders whose IDs can be found within the values the _\@OrderID_ query parameter provides.
92
+
You can map [multi-value parameters](../shape-report-data/use-report-parameters/multi-value-report-parameters.md) to query parameters. For instance, the following query selects the orders whose IDs can be found within the values the _\@OrderID_ query parameter provides.
## <aname="multivalueparameterinstoredprocedure"></a>Pass a Multi-Value Report Parameter Value to a Stored Procedure
97
-
You cannot pass a [multi-value parameter](multi-value-and-cascading-parameters.md) value to a stored procedure directly. Use one of the following expression functions:
97
+
You cannot pass a [multi-value parameter](../shape-report-data/use-report-parameters/multi-value-report-parameters.md) value to a stored procedure directly. Use one of the following expression functions:
98
98
99
-
* Use the [Join() expression function](../../use-expressions/expression-syntax.md) to convert the array of parameter values to a string if you use MS SQL Server, MySQL or Oracle database systems.
99
+
* Use the [Join() expression function](../use-expressions/expression-syntax.md) to convert the array of parameter values to a string if you use MS SQL Server, MySQL or Oracle database systems.
* Use the [CreateTable() expression function](../../use-expressions/expression-syntax.md) to prepare a table using values of several multi-value parameters.
103
+
* Use the [CreateTable() expression function](../use-expressions/expression-syntax.md) to prepare a table using values of several multi-value parameters.
0 commit comments