Skip to content

Commit 26d7e6a

Browse files
Merge pull request #103 from serge-andreyev/master
Localize Reports, Report with PDF Content, Rich Text Export, Parameters
2 parents 0b23489 + b343cae commit 26d7e6a

File tree

223 files changed

+1524
-710
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+1524
-710
lines changed

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The Report Designer allows you to create data-bound reports and provides a rich
2525
* [Add Extra Information](report-designer-for-winforms/add-extra-information.md)
2626
* [Use Expressions](report-designer-for-winforms/use-expressions.md)
2727
* [Use Report Scripts](report-designer-for-winforms/use-report-scripts.md)
28+
* [Localize Reports](report-designer-for-winforms/localize-reports.md)
2829
* [Report Designer Tools](report-designer-for-winforms/report-designer-tools.md)
2930
* [Preview, Print and Export Reports](report-designer-for-winforms/preview-print-and-export-reports.md)
3031

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The following tutorials illustrate how to bind a report to various data sources:
88

99
* [Bind a Report to a Database](bind-to-data/bind-a-report-to-a-database.md)
1010
* [Bind a Report to a Stored Procedure](bind-to-data/bind-a-report-to-a-stored-procedure.md)
11+
* [Specify Query Parameters](bind-to-data/specify-query-parameters.md)
1112
* [Bind a Report to an XML File](bind-to-data/bind-a-report-to-an-xml-file.md)
1213
* [Bind a Report to an Entity Framework Data Source](bind-to-data/bind-a-report-to-an-entity-framework-data-source.md)
1314
* [Bind a Report to an Object Data Source](bind-to-data/bind-a-report-to-an-object-data-source.md)

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-a-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This tutorial demonstrates how to bind a report to a hierarchical data source an
4545
>
4646
> 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).
4747
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.
4949

5050
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.
5151

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-a-stored-procedure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This tutorial demonstrates how to bind a report to a stored procedure provided b
2727
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**.
2828

2929
![](../../../../images/eurd-win-data-source-wizard-select-stored-procedure.png)
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 [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.
3131

3232
Click the **Preview** button and select a query to preview the result of the stored procedure execution with the specified parameters.
3333

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data/bind-a-report-to-json-data.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: 'Bind a Report to JSON Data'
44

55
# Bind a Report to JSON Data
66

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.
88

99
## Create JsonDataSource
1010

@@ -23,29 +23,58 @@ This topic describes how to bind a report to JSON data at design time.
2323
> [!Note]
2424
> The Report Designer's Report Wizard provides the JSON option if the application has a reference to the open-source Newtonsoft.Json library.
2525

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).
2727

28-
- Web Service Endpoint URI
28+
- Choose **Web Service Endpoint** and specify the endpoint data.
2929

3030
![](../../../../images/eurd-win-JSON-URISource.png)
3131

32-
- File Name
32+
- Choose **JSON File** and specify the JSON file location.
3333

3434
![](../../../../images/eurd-win-JSON-File.png)
3535

36-
- String with JSON Content
36+
- Choose **JSON String** and provide the JSON data string.
3737

3838
![](../../../../images/eurd-win-JSON-String.png)
3939

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.
4141

42-
4.1. Specify request parameters.
42+
4.1. Specify path parameters and query parameters.
4343

4444
![JSON-specify-request-parameters](../../../../images/eurd-win-JSON-specify-request-parameters.png)
4545

46-
> [!Tip]
47-
> 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**.
49+
50+
![JSON-specify-parameter-expression](../../../../images/eurd-win-JSON-path-parameter-specify-expression.png)
51+
52+
- 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**.
53+
54+
![JSON-add-report-parameter](../../../../images/eurd-win-JSON-add-report-parameter.png)
55+
56+
> [!NOTE]
57+
> 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.
63+
64+
![JSON-resulting-uri](../../../../images/eurd-win-JSON-resulting-uri.png)
4865

66+
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.
69+
70+
![JSON-header-parameters](../../../../images/eurd-win-JSON-header-parameters.png)
71+
72+
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.
73+
74+
![JSON-save-connection-string](../../../../images/eurd-win-JSON-save-connection-string.png)
75+
76+
> [!Tip]
77+
> 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.
4978
5079
5. On the next page, the wizard shows the specified JSON data's structure. You can choose all nodes or a subset of nodes.
5180

@@ -57,12 +86,10 @@ This topic describes how to bind a report to JSON data at design time.
5786

5887
![JSON-EditFieldNames](../../../../images/eurd-win-JSON-EditFieldNames.png)
5988

60-
6189
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.
6290

6391
![JSON-FieldList](../../../../images/eurd-win-JSON-FieldList.png)
6492

65-
6693
## Customize the JSON Data Source
6794

6895
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.

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/shape-report-data/use-report-parameters/query-parameters.md renamed to interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/bind-to-data/specify-query-parameters.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
---
2-
title: Query Parameters
2+
title: Specify Query Parameters
33
author: Anna Gubareva
44
---
5-
# Query Parameters
5+
# Specify Query Parameters
66

7-
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.
88

99
## <a name="overview"></a>Query Parameters Overview
10-
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.
1111

1212
The query parameter value is inserted into the resulting SQL query string in the "\@QueryParameterName" placeholder's position.
1313

1414
Query parameters are used in the following scenarios:
1515

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).
1717

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),
1919

20-
![](../../../../../images/eurd-win-query-parameters-create-query.png)
20+
![](../../../../images/eurd-win-query-parameters-create-query.png)
2121

2222
... or when adding queries to an existing SQL data source or editing existing queries.
2323

24-
![](../../../../../images/eurd-win-query-parameters-manage-queries-menu-item.png)
24+
![](../../../../images/eurd-win-query-parameters-manage-queries-menu-item.png)
2525

2626
You can filter the constructed queries using query parameters. Press the **Edit Parameters...** button to invoke the **Query Parameters** dialog.
2727

28-
![](../../../../../images/eurd-win-query-parameters-add-in-query-builder.png)
28+
![](../../../../images/eurd-win-query-parameters-add-in-query-builder.png)
2929

3030
Press the **Filter...** button to invoke the Filter Editor and filter data using the created query parameters.
3131

32-
![](../../../../../images/eurd-win-query-parameters-in-filter-editor.png)
32+
![](../../../../images/eurd-win-query-parameters-in-filter-editor.png)
3333

3434
The criteria based on the specified query parameters are added as an SQL statement's WHERE part.
3535

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.
3737

3838
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.
3939

40-
![](../../../../../images/eurd-win-query-parameters-for-stored-procedure.png)
40+
![](../../../../images/eurd-win-query-parameters-for-stored-procedure.png)
4141

4242
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.
4343

44-
![](../../../../../images/eurd-win-query-parameters-query-properties.png)
44+
![](../../../../images/eurd-win-query-parameters-query-properties.png)
4545

4646
You can add new query parameters in the Query Parameters dialog and modify the filter within the Filter Editor.
4747

@@ -51,7 +51,7 @@ The following properties are available for each query parameter:
5151
* **Name** - specifies the parameter's name.
5252
* **Type** - specifies the parameter value's data type.
5353
* **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.
5555

5656
## <a name="providevalue"></a>Provide the Query Parameter Value
5757
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
6060

6161
Choose a query parameter's value type and set a static value to the **Value** property according to the selected type.
6262

63-
![](../../../../../images/eurd-win-query-parameters-static-value.png)
63+
![](../../../../images/eurd-win-query-parameters-static-value.png)
6464

6565
* **Providing a dynamic value**
6666

@@ -70,36 +70,36 @@ Below, you can see how a value is specified for a query parameter within the Dat
7070

7171
* Create a complex expression by expanding the **Value** property's drop-down list and selecting **Expression Editor**.
7272
73-
![](../../../../../images/eurd-win-query-parameters-dynamic-expression.png)
73+
![](../../../../images/eurd-win-query-parameters-dynamic-expression.png)
7474
7575
Construct an expression in the invoked **Expression Editor**.
7676
77-
![](../../../../../images/eurd-win-query-parameters-expression-editor.png)
77+
![](../../../../images/eurd-win-query-parameters-expression-editor.png)
7878

7979
* Map a new report parameter to a query parameter by expanding the **Value** property's drop-down list and selecting **New Report Parameter**.
8080
81-
![](../../../../../images/eurd-win-query-parameters-new-report-parameter.png)
81+
![](../../../../images/eurd-win-query-parameters-new-report-parameter.png)
8282
8383
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.
8484
85-
![](../../../../../images/eurd-win-query-parameters-report-parameter-settings.png)
85+
![](../../../../images/eurd-win-query-parameters-report-parameter-settings.png)
8686

8787
* 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.
8888
89-
![](../../../../../images/eurd-win-query-parameters-existing-report-parameter.png)
89+
![](../../../../images/eurd-win-query-parameters-existing-report-parameter.png)
9090

9191
## <a name="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.
9393

94-
![](../../../../../images/eurd-win-query-parameters-map-to-multi-value-parameter.png)
94+
![](../../../../images/eurd-win-query-parameters-map-to-multi-value-parameter.png)
9595

9696
## <a name="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:
9898

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.
100100

101-
![](../../../../../images/eurd-win-query-parameters-join-expression-function.png)
101+
![](../../../../images/eurd-win-query-parameters-join-expression-function.png)
102102

103-
* 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.
104104

105-
![](../../../../../images/eurd-win-query-parameters-createtable-expression-function.png)
105+
![](../../../../images/eurd-win-query-parameters-createtable-expression-function.png)

0 commit comments

Comments
 (0)