Skip to content

Commit 3728422

Browse files
authored
Merge pull request #196 from DevExpress/update-files
Update files
2 parents 6017fb0 + a6af9db commit 3728422

File tree

4 files changed

+26
-77
lines changed

4 files changed

+26
-77
lines changed

reporting-for-desktop/articles/report-designer/report-designer-for-winforms/use-expressions/functions-in-expressions.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ This topic lists the functions that you can use in an [expression](expressions-o
4040
| DateDiffSecond(startDate, endDate) | Returns the number of second boundaries between two non-nullable dates. | DateDiffSecond([StartTime], Now()) |
4141
| DateDiffTick(startDate, endDate) | Returns the number of tick boundaries between two non-nullable dates. | DateDiffTick([StartTime], Now()) |
4242
| DateDiffYear(startDate, endDate) | Returns the number of year boundaries between two non-nullable dates. | DateDiffYear([StartTime], Now()) |
43+
| DateTimeFromParts(Year, Month, Day, Hour, Minute, Second, Millisecond) | Returns a date value constructed from the specified Year, Month, Day, Hour, Minute, Second, and Millisecond. | DateTimeFromParts(2018, 5, 5, 20) |
4344
| GetDate(DateTime) | Extracts a date from the defined DateTime. | GetDate([OrderDateTime]) |
4445
| GetDay(DateTime) | Extracts a day from the defined DateTime. | GetDay([OrderDate]) |
4546
| GetDayOfWeek(DateTime) | Extracts a day of the week from the defined DateTime. | GetDayOfWeek([OrderDate]) |
@@ -306,6 +307,15 @@ Use the following functions when you [calculate a summary](../shape-report-data/
306307
sumAvg([UnitPrice])
307308
```
308309
310+
* sumCarryoverSum(Expression)
311+
312+
Calculates the carried forward and brought forward totals.
313+
314+
```
315+
sumCarryoverSum([Amount])
316+
```
317+
318+
309319
* sumCount(Expression)
310320
Counts the number of values within the specified summary region (group, page, or report). In a simple scenario, you may not pass a parameter.
311321

reporting-for-desktop/articles/report-designer/report-designer-for-wpf.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The Report Designer allows you to create new reports from scratch, bind them to
1010

1111
![EndUserReportFDesignerForWPF](../../images/img120311.png)
1212

13+
14+
> [!NOTE]
15+
> The WPF End-User Report Designer does not support code completion.
16+
1317
Different aspects of using the Report Designer are covered in the following documentation sections.
1418
* [Creating Reports](report-designer-for-wpf/creating-reports.md)
1519

reporting-for-desktop/articles/report-designer/report-designer-for-wpf/creating-reports/scripting.md

Lines changed: 3 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ legacyId: 116357
77
This document describes the basic principles of _scripting_, which can be performed by handling the events of a report, and its [bands](../report-elements/report-bands.md) and [controls](../report-elements/report-controls.md).
88

99
This documents consists of the following sections.
10-
* [Scripting Overview](#overview)
11-
* [Maintaining Scripts](#maintain)
12-
* [Example: Custom Summary](#example)
10+
- [Scripting](#scripting)
11+
- [Scripting Overview](#scripting-overview)
12+
- [Maintaining Scripts](#maintaining-scripts)
1313

1414
<a name="overview"/>
1515

@@ -40,77 +40,3 @@ After the event is specified, a code template is automatically generated in the
4040
To check for errors in the report's script, click the **Validate** button. The validation result is displayed in the errors panel at the bottom of the Script Editor. Double-click the error item in the panel's list to go to the corresponding line of code. If all scripts are valid, the errors panel is empty.
4141

4242
![WPFDesigner_ScriptErrorPanel](../../../../images/img123171.png)
43-
44-
<a name="example"/>
45-
46-
## <a name="example"/>Example: Custom Summary
47-
This example demonstrates how to display the total number of product unit packs in a group.
48-
49-
To perform this, execute steps similar to the ones described in [Calculating Summaries](shaping-data/calculating-summaries.md), except that for the summary field, you should set the **Function** property to **Custom**.
50-
51-
![EUD_WpfReportDesigner_Scripting_1](../../../../images/img123899.png)
52-
53-
Then, the additional events are added to the label's **Scripts** property.
54-
55-
![EUD_WpfReportDesigner_Scripting_2](../../../../images/img123900.png)
56-
57-
You can handle these events in the following way.
58-
59-
**C#**
60-
61-
```csharp
62-
63-
// Declare a summary and a pack.
64-
double totalUnits = 0;
65-
double pack = 15;
66-
67-
private void label1_SummaryReset(object sender, System.EventArgs e) {
68-
// Reset the result each time a group is printed.
69-
totalUnits = 0;
70-
}
71-
72-
private void label1_SummaryRowChanged(object sender, System.EventArgs e) {
73-
// Calculate a summary.
74-
totalUnits += Convert.ToDouble(GetCurrentColumnValue("UnitsOnOrder"));
75-
}
76-
77-
private void label1_SummaryGetResult(object sender,
78-
DevExpress.XtraReports.UI.SummaryGetResultEventArgs e) {
79-
// Round the result, so that a pack will be taken into account
80-
// even if it contains only one unit.
81-
e.Result = Math.Ceiling(totalUnits / pack);
82-
e.Handled = true;
83-
}
84-
85-
```
86-
**VB.NET**
87-
88-
```vb
89-
90-
' Declare a summary and a pack.
91-
Private totalUnits As Double = 0
92-
Private pack As Double = 15
93-
94-
Private Sub label1_SummaryReset(ByVal sender As Object, ByVal e As System.EventArgs)
95-
' Reset the result each time a group is printed.
96-
totalUnits = 0
97-
End Sub
98-
99-
Private Sub label1_SummaryRowChanged(ByVal sender As Object, ByVal e As System.EventArgs)
100-
' Calculate a summary.
101-
totalUnits += Convert.ToDouble(GetCurrentColumnValue("UnitsOnOrder"))
102-
End Sub
103-
104-
Private Sub label1_SummaryGetResult(ByVal sender As Object, _
105-
ByVal e As DevExpress.XtraReports.UI.SummaryGetResultEventArgs)
106-
' Round the result, so that a pack will be taken into account
107-
' even if it contains only one unit.
108-
e.Result = Math.Ceiling(totalUnits / pack)
109-
e.Handled = True
110-
End Sub
111-
112-
```
113-
114-
Finally, switch to the [Print Preview](../document-preview.md) tab and view the result.
115-
116-
![EUD_WpfReportDesigner_Scripting_3](../../../../images/img123901.png)

reporting-for-web/articles/report-designer/use-expressions/functions-in-expressions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ This topic lists the functions that you can use in an [expression](expressions-o
4040
| DateDiffSecond(startDate, endDate) | Returns the number of second boundaries between two non-nullable dates. | DateDiffSecond([StartTime], Now()) |
4141
| DateDiffTick(startDate, endDate) | Returns the number of tick boundaries between two non-nullable dates. | DateDiffTick([StartTime], Now()) |
4242
| DateDiffYear(startDate, endDate) | Returns the number of year boundaries between two non-nullable dates. | DateDiffYear([StartTime], Now()) |
43+
| DateTimeFromParts(Year, Month, Day, Hour, Minute, Second, Millisecond) | Returns a date value constructed from the specified Year, Month, Day, Hour, Minute, Second, and Millisecond. | DateTimeFromParts(2018, 5, 5, 20) |
4344
| GetDate(DateTime) | Extracts a date from the defined DateTime. | GetDate([OrderDateTime]) |
4445
| GetDay(DateTime) | Extracts a day from the defined DateTime. | GetDay([OrderDate]) |
4546
| GetDayOfWeek(DateTime) | Extracts a day of the week from the defined DateTime. | GetDayOfWeek([OrderDate]) |
@@ -306,6 +307,14 @@ Use the following functions when you [calculate a summary](../shape-report-data/
306307
sumAvg([UnitPrice])
307308
```
308309
310+
* sumCarryoverSum(Expression)
311+
312+
Calculates the carried forward and brought forward totals.
313+
314+
```
315+
sumCarryoverSum([Amount])
316+
```
317+
309318
* sumCount(Expression)
310319
Counts the number of values within the specified summary region (group, page, or report). In a simple scenario, you may not pass a parameter.
311320

0 commit comments

Comments
 (0)