Skip to content

Commit 73f7aea

Browse files
Merge pull request #162 from epolevikov/master
EUD 21.2 (Use Report Parameters, PDF Content, Reports with Embedded PDF, Query Builder)
2 parents 4b8f199 + c22948e commit 73f7aea

File tree

331 files changed

+1854
-933
lines changed

Some content is hidden

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

331 files changed

+1854
-933
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
@@ -17,6 +17,7 @@ The Report Designer allows you to create data-bound reports and provides a rich
1717
* [Create Reports](report-designer-for-winforms/create-reports.md)
1818
* [Configure Design Settings](report-designer-for-winforms/configure-design-settings.md)
1919
* [Use Report Elements](report-designer-for-winforms/use-report-elements.md)
20+
* [Use Report Parameters](report-designer-for-winforms/use-report-parameters.md)
2021
* [Shape Report Data](report-designer-for-winforms/shape-report-data.md)
2122
* [Lay out Dynamic Report Content](report-designer-for-winforms/lay-out-dynamic-report-content.md)
2223
* [Customize Appearance](report-designer-for-winforms/customize-appearance.md)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This tutorial describes how to bind a report to an object data source:
3333

3434
8. The next wizard page allows you to specify the constructor parameters.
3535

36-
Enabling the checkbox in the **Expression** column allows you to specify the parameter expression (using the **Expression Editor**), as well as pass an existing [report parameter](../shape-report-data/use-report-parameters.md) to the constructor (or create a new report parameter using the in-place editor).
36+
Enabling the checkbox in the **Expression** column allows you to specify the parameter expression (using the **Expression Editor**), as well as pass an existing [report parameter](../use-report-parameters.md) to the constructor (or create a new report parameter using the in-place editor).
3737

3838
![](../../../../images/eurd-win-data-source-wizard-object-constructor-parameters.png)
3939

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This topic describes how to bind a report to JSON data.
4949

5050
![JSON-specify-parameter-expression](../../../../images/eurd-win-JSON-path-parameter-specify-expression.png)
5151

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**.
52+
- Expressions can include [report parameters](../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**.
5353

5454
![JSON-add-report-parameter](../../../../images/eurd-win-JSON-add-report-parameter.png)
5555

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Report Designer works in one of the following data binding modes:
88

99
* **Expressions** is the default binding mode.
1010

11-
This mode enables you to specify complex [expressions](../use-expressions.md) that include two or more data fields, [report parameters](../shape-report-data/use-report-parameters.md), or [functions](../use-expressions/expression-language.md). You can also use expressions to [calculate summaries](../shape-report-data/calculate-summaries/calculate-a-summary.md) of any complexity or [conditionally shape your data](../shape-report-data/specify-conditions-for-report-elements.md).
11+
This mode enables you to specify complex [expressions](../use-expressions.md) that include two or more data fields, [report parameters](../use-report-parameters.md), or [functions](../use-expressions/expression-language.md#functions). You can also use expressions to [calculate summaries](../shape-report-data/calculate-summaries/calculate-a-summary.md) of any complexity or [conditionally shape your data](../shape-report-data/specify-conditions-for-report-elements.md).
1212

1313
Click a property's marker to see whether the invoked context menu has the **PropertyName Expression** item that invokes the **Expression Editor**.
1414

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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](../shape-report-data/use-report-parameters.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](../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.
@@ -89,12 +89,12 @@ Below, you can see how a value is specified for a query parameter within the Dat
8989
![](../../../../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](../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.
92+
You can map [multi-value parameters](../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

9494
![](../../../../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](../shape-report-data/use-report-parameters/multi-value-report-parameters.md) value to a stored procedure directly. Use one of the following expression functions:
97+
You cannot pass a [multi-value parameter](../use-report-parameters/multi-value-report-parameters.md) value to a stored procedure directly. Use one of the following expression functions:
9898

9999
* Use the [Join() expression function](../use-expressions/functions-in-expressions.md) to convert the array of parameter values to a string if you use MS SQL Server, MySQL or Oracle database systems.
100100

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ You can add interactive elements to your report to customize it in Print Preview
5959
> [!Note]
6060
> See the [Provide Interactivity](provide-interactivity.md) section for information on how to provide drill-down and drill-through functionality in your reports.
6161
>
62-
> See [Use Report Parameters](shape-report-data/use-report-parameters.md) for instructions on how to submit parameter values in Print Preview to customize your reports.
62+
> See [Use Report Parameters](use-report-parameters.md) for instructions on how to submit parameter values in Print Preview to customize your reports.
6363
6464
## Layout Features
6565

6666
### [Reports with Cross-Band Content and Populated Empty Space](create-reports/reports-with-cross-band-content-and-populated-empty-space.md)
6767
![](../../../images/cross-band-and-populated-empty-space-report-preview.png)
6868

69-
### [Reports with PDF content](create-reports/reports-with-pdf-content.md)
69+
### [Reports with PDF content](create-reports/reports-merged-with-pdf.md)
7070
![](../../../images/report-with-pdf-content-preview.png)
7171

7272
### [Reports with a Visual PDF Signature](create-reports/reports-with-visual-pdf-signature.md)

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/create-reports/reports-with-pdf-content.md renamed to interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/create-reports/reports-merged-with-pdf.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Reports with PDF Content
2+
title: Reports Merged with PDF
33
author: Sergey Andreev
44
---
5-
# Reports with PDF Content
5+
# Reports Merged with PDF
66

77
This tutorial describes how to add PDF content to a report.
88

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
---
2+
title: Reports with Embedded PDF Content
3+
author: Eugene Polevikov
4+
---
5+
6+
# Reports with Embedded PDF Content
7+
8+
This tutorial explains how to use the [PDF Content](../use-report-elements/use-basic-report-controls/pdf-content.md) control to do the following:
9+
10+
* Append PDF file pages to a report and make their paper kind the same as in the inital report.
11+
* Add sequential page numbers to the report and PDF file pages.
12+
* Include additional information in the embedded PDF file pages.
13+
14+
The image below shows an invoice report that contains information about order items.
15+
16+
![Final Report Page 1](../../../../images/create-report-with-pdf-content-final-report-page1.png)
17+
18+
The following image illustrates the first PDF file page embedded to the invoice report. This page has the same paper kind as the initial report. [Report controls](../use-report-elements/use-basic-report-controls.md) are used to add item title, item price, line, logo image, and sequential page numbers to this page.
19+
20+
![Final Report Page 2](../../../../images/create-report-with-pdf-content-final-report-page2.png)
21+
22+
To create the above report with PDF content, follow the steps described in these sections:
23+
24+
* [Create the Main Report](#create-the-main-report)
25+
* [Create a Report with PDF Content](#create-a-report-with-pdf-content)
26+
* [Add the Report with PDF content to the Main Report](#add-the-report-with-pdf-content-to-the-main-report)
27+
28+
## Create the Main Report
29+
30+
1. Open the [Report Designer](../../report-designer-for-winforms.md) and [add a new blank report](../../report-designer-for-winforms/add-new-reports.md).
31+
2. Design the report layout. In this tutorial, we create an invoice report that contains information about order items.
32+
33+
![Main Report Layout](../../../../images/pdfcontent-embedded-mode-main-report-layout.png)
34+
35+
To supply the report with data, use the following JSON string:
36+
37+
```
38+
{
39+
"InvoiceNumber": 241756,
40+
"OrderDate": "2018-04-23T18:25:43.511Z",
41+
"Customer": {
42+
"Name": "Walters",
43+
"HomeOffice_Line": "200 Wilmot Rd",
44+
"HomeOffice_City": "Deerfield",
45+
"HomeOffice_StateName": "IL",
46+
"HomeOffice_ZipCode": "60015"
47+
},
48+
"Store": {
49+
"Address_City": "Anaheim",
50+
"Address_Line": "1720 W La Palma Ave",
51+
"Address_StateName": "CA",
52+
"Address_ZipCode": "83709"
53+
},
54+
"Employee": {
55+
"FullName": "Harv Mudd"
56+
},
57+
"PONumber": "122023",
58+
"ShipMethod": 0,
59+
"OrderTerms": "15 Days",
60+
"OrderItems": [
61+
{
62+
"ProductName": "SuperLED 42",
63+
"ProductPrice": 1050,
64+
"ProductUnits": 2,
65+
"Discount": 50,
66+
"Total": 2050
67+
},
68+
{
69+
"ProductName": "SuperLED 50",
70+
"ProductPrice": 1100,
71+
"ProductUnits": 5,
72+
"Discount": 500,
73+
"Total": 5000
74+
},
75+
{
76+
"ProductName": "Projector PlusHD",
77+
"ProductPrice": 600,
78+
"ProductUnits": 5,
79+
"Discount": 250,
80+
"Total": 2750
81+
},
82+
{
83+
"ProductName": "HD Video Player",
84+
"ProductPrice": 220,
85+
"ProductUnits": 10,
86+
"Discount": 200,
87+
"Total": 2000
88+
}
89+
],
90+
"ShippingAmount": 375,
91+
"TotalAmount": 12175
92+
}
93+
```
94+
95+
The following image illustrates the main report's **Preview**:
96+
97+
![Main Report Preview](../../../../images/pdfcontent-embedded-mode-main-report-preview.png)
98+
99+
## Create a Report with PDF Content
100+
101+
1. Create a new blank report. Remove the report's margins.
102+
103+
![Add a New Blank Report and Remove Margins](../../../../images/create-report-with-pdf-content-add-new-blank-report-and-remove-margins.png)
104+
105+
2. Drop the [PDF Content](../use-report-elements/use-basic-report-controls/pdf-content.md) control from the **Toolbox** onto the *Detail* band.
106+
107+
![Drop the PDF Content Control Onto the Detail Band](../../../../images/create-report-with-pdf-content-drop-xrpdfcontent-control-onto-detail-band.png)
108+
109+
3. Expand the control's smart tag, click the **Source** or **Source URL** property's ellipsis button, and select PDF file. In this demo, we use the following PDF specification: [Specification.pdf](https://github.com/DevExpress-Examples/DataSources/blob/master/Specification.pdf).
110+
111+
![Specify PDF File Source](../../../../images/create-report-with-pdf-content-specify-pdf-file-source.png)
112+
113+
4. Disable the control's **Generate Own Pages** property. Adjust the control size to make PDF content fit the entire *Detail* band. For this, set the *Detail* band's **Height** to *1095* and the control's **Width** and **Height** to *850* and *1095*.
114+
115+
![Make PDF Content Fit the Entire Detail Band](../../../../images/create-report-with-pdf-content-make-pdf-content-fit-entire-detail-band.png)
116+
117+
5. Disable the report's **Designer Options -> Show Export Warnings** property. Bind the report to the following JSON data:
118+
119+
```
120+
{
121+
"InvoiceNumber": 241756,
122+
"OrderDate": "2018-04-23T18:25:43.511Z",
123+
"Customer": {
124+
"Name": "Walters",
125+
"HomeOffice_Line": "200 Wilmot Rd",
126+
"HomeOffice_City": "Deerfield",
127+
"HomeOffice_StateName": "IL",
128+
"HomeOffice_ZipCode": "60015"
129+
},
130+
"Store": {
131+
"Address_City": "Anaheim",
132+
"Address_Line": "1720 W La Palma Ave",
133+
"Address_StateName": "CA",
134+
"Address_ZipCode": "83709"
135+
},
136+
"Employee": {
137+
"FullName": "Harv Mudd"
138+
},
139+
"PONumber": "122023",
140+
"ShipMethod": 0,
141+
"OrderTerms": "15 Days",
142+
"OrderItems": [
143+
{
144+
"ProductName": "SuperLED 42",
145+
"ProductPrice": 1050,
146+
"ProductUnits": 2,
147+
"Discount": 50,
148+
"Total": 2050
149+
},
150+
{
151+
"ProductName": "SuperLED 50",
152+
"ProductPrice": 1100,
153+
"ProductUnits": 5,
154+
"Discount": 500,
155+
"Total": 5000
156+
},
157+
{
158+
"ProductName": "Projector PlusHD",
159+
"ProductPrice": 600,
160+
"ProductUnits": 5,
161+
"Discount": 250,
162+
"Total": 2750
163+
},
164+
{
165+
"ProductName": "HD Video Player",
166+
"ProductPrice": 220,
167+
"ProductUnits": 10,
168+
"Discount": 200,
169+
"Total": 2000
170+
}
171+
],
172+
"ShippingAmount": 375,
173+
"TotalAmount": 12175
174+
}
175+
```
176+
177+
6. Place two [labels](../use-report-elements/use-basic-report-controls/label.md), a [line](../use-report-elements/draw-lines-and-shapes/draw-lines.md), and a [picture box](..\use-report-elements\use-basic-report-controls\picture-box.md) on the PDF page header as shown below:
178+
179+
![Add Controls to Page Header](../../../../images/create-report-with-pdf-content-make-pdf-content-add-controls-to-page-header.png)
180+
181+
Use the following locations and sizes:
182+
183+
| Control Name | Location | Size |
184+
| --- | --- | --- |
185+
| label1 | 105, 94 | 280, 44 |
186+
| label2 | 105, 138 | 118, 30 |
187+
| line1 | 105, 69 | 687, 20 |
188+
| pictureBox1 | 647, 24 | 145, 45 |
189+
190+
7. Set the line's **Width** and **Fore Color** to *2* and *Orange* respectively. Assign the following image to the picture box's **Image Source** property:
191+
192+
![DevAV Icon](../../../../images/devav.png)
193+
194+
Make the label1's font bold. Set up label appearance as shown in the table below:
195+
196+
| Control Name | Font | Font Size | Text Property's Expression | Text Format String |
197+
| --- | --- | --- | --- | --- |
198+
| label1 | Segoe UI | 21 | *ProductName* | - |
199+
| label2 | Segoe UI | 12 | *ProductPrice* | {0:$0} |
200+
201+
![Bind Labels to Data](../../../../images/create-report-with-pdf-content-make-pdf-content-bind-labels-to-data.png)
202+
203+
To display a product name and price of each order item on a corresponding PDF file page, set the PDF Content **Page Range** property's [expression](../use-expressions.md) to *[DataSource.CurrentRowIndex] + 1*.
204+
205+
![Assign Expression to the Page Range Property](../../../../images/create-report-with-pdf-content-assign-expression-to-page-range.png)
206+
207+
8. Add the [Page Info](..\use-report-elements\use-basic-report-controls\page-info.md) control to the PDF page footer. Use the following settings for this control:
208+
209+
| Location | Size | Font | Font Size | Text Alignment | Text Format String |
210+
| --- | --- | --- | --- | --- | --- |
211+
| 0, 1045 | 850, 50 | Segoe UI | 12 | Middle Center | Page {0} of {1} |
212+
213+
![Add Page Numbers](../../../../images/create-report-with-pdf-content-add-page-numbers.png)
214+
215+
Open **Preview** to show the result. The image below shows the report's first page:
216+
217+
![Final Report Preview](../../../../images/create-report-with-pdf-content-preview.png)
218+
219+
## Add the Report with PDF Content to the Main Report
220+
221+
1. Add a footer to the main report. Right-click the design surface, choose **Insert Band**, and select **ReportFooter**.
222+
223+
![Add Report Footer](../../../../images/create-report-with-pdf-content-add-report-footer.png)
224+
225+
2. Add the [Subreport](..\use-report-elements\use-basic-report-controls\subreport.md) control to the footer. Assign the path the report with PDF content to the control's **Report Source URL** property. Enable the control's **Generate Own Pages** property.
226+
227+
![Add the Subreport](../../../../images/create-report-with-pdf-content-add-subreport.png)
228+
229+
3. Add the [Page Info](..\use-report-elements\use-basic-report-controls\page-info.md) control to the report's **Bottom Margin** band. Set the control's **Text Alignment** propery to *Middle Center* and the **Text Format String** property to *Page {0} of {1}*.
230+
231+
![Add Page Numbers to Main Report](../../../../images/create-report-with-pdf-content-add-page-number-to-main-report.png)
232+
233+
Open **Preview** to show the result.
234+
235+
![Final Report Page 1](../../../../images/create-report-with-pdf-content-final-report-page1.png)
236+
237+
![Final Report Page 2](../../../../images/create-report-with-pdf-content-final-report-page2.png)

interface-elements-for-desktop/articles/report-designer/report-designer-for-winforms/provide-interactivity/edit-content-in-print-preview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The sections below provide information about options these controls expose. You
3636
* Changes made to a control's content in Print Preview does not effect the document's other parts (for example, summary results, grouping, sorting, bookmarks and other settings that were processed before the document was generated).
3737
* A control's **Can Grow** setting is ignored for editable fields. The edited area cannot exceed the control's original dimensions.
3838
* Multi-line values can only be entered when no mask is applied to an editable field.
39-
* Values entered into editable fields are reset after the document is refreshed (for example, when you submit [report parameter](..\shape-report-data\use-report-parameters.md) values or expand/collapse data in a [drill-down report](create-drill-down-reports.md)).
39+
* Values entered into editable fields are reset after the document is refreshed (for example, when you submit [report parameter](../use-report-parameters.md) values or expand/collapse data in a [drill-down report](create-drill-down-reports.md)).
4040
* It is not possible to edit content in bands if their **DrillDownControl** property is specified.
4141
* The entered values are not preserved in the Top Margin and Bottom Margin bands when the report is exported as a single file to the following formats:
4242

0 commit comments

Comments
 (0)