1) On the Client screen, click on Form (CTRL + F).
2) Report File List screen will open, click the New button at the bottom right, the Output design page will open. The name of the blank design is created and saved by following the steps below. Then the Report File list is opened to edit the design, the relevant design will be displayed with its name. Click on it to open the design page.
3)Form Design page is opened. You can access general properties from the XtraReport field in the Properties section.
4) Bands can be added to the design screen from the field marked in the Actions section of the Properties window. Each of these bands has different properties. These will be explained in the next steps.
5) The format of the related data can be edited by clicking on any field dragged on the design. The appropriate format can be specified in the “Text Format String” field under the “Actions” field or you can go to the editor page by clicking on the three dots and select from there. For example, if we select that field and type {0:n2} in the Format field, the layout 2.500.000,00 will be displayed.
6) On the first design screen that opens, there are Upper Edge Band, Detail Band and Lower Edge Band.
7) You can write the data you will add to these bands by dragging and dropping the Label from the design tools on the left side of the design screen.
8) You can view the changes made on the design screen on the layout by making a print preview in the area marked below from the tools at the top of the form design. In this section there are cut, copy, paste, delete, backward, forward, size adjustment, full screen tools. To the left of the print preview icon is the Scripts tool where you can add code.
9) When you click Add New Field, you will see a window where you can write a query. You can give a name to the query in the “Field Name” section. You can choose Dynamic, Static or Datasource from the Type section. When writing a query, you should select the Datasource type. You can type the query in the field below.
| On this screen ‘’' If $P ‘’ is used, the relevant data should be on the client screen. You can save the query and exit. |
10) On the right side of the form design screen, there is a Fields tool under the Properties tool. When Datasource List (Field List) is opened, tables, static fields and queries will appear in this field.
In the Data Member field under the Actions field, click on the name of the relevant table and add where the data comes from, then click on the ‘Field List’ field from field number 3 and drag the fields in the relevant table connected with the data member to the design area.
There is a Report Explorer tool under the Fields tool. You can view all the fields you have added to the design in general in this tool.
Let's examine the main headings under Properties:
12) Actions:
| When the TopMargin and Bottom Margin1 bands are selected, only the band fields are active in the Actions tab. |
Bands added from the Actions area under Properties and their functions:
After adding these bands, you can expand and collapse them by pulling them down with the ruler from the left.
- Top Margin Band: This field is already present at the top when the design page is opened. It provides the minimum space where the printer should not print content from the top margin. Content can be added to this field, but it is not on a line basis as in the detail band. It generates content once for the entire report.
- Insert Report Header Band: The part following the Top Border Band on the first page. If it is longer, it continues to other pages. It is shown once on the first page of the report, used for fixed information such as the general title of the report, logo, date, etc. It is not repeated on other pages.
- Insert Page Header Band:When inserted, it is located at the top of each page. It is ideal for column headers, repetitive table headers. It repeats at the top of each page even if the page changes.
- Insert Group Header Band: After the Report Header Band section, immediately following the Page Header Band (as shown on each page) and before Detail.
Used to group data according to a specific field.
For example Customer, Region, Category.
When the group changes, it is shown again.
PivotGrid, table or text can be added inside.
- Detail Band: You should add the fields and table you get with the query here. This field is already in the center when the design page is opened. If more than one value is returned, it will be shown in the Detail section because this band repeats once for each record (row). Compress the fields you added to the Detail section. You only need to make room for the Detail field from the ruler on the left side of the design. Because it prints as many times as the data in this field. Otherwise it prints as empty. If you want, you can add border to the fields from border.
| The table added in the Detail band must be placed without top and bottom margins. Otherwise, unnecessary gaps are created between each row of data and this causes visual disorganization in the design of the report. |
- Insert Detail Report Band: It is used for sub-detail data connected to the main data.
Because the data here comes after each row.
In master-detail structures, the records (sub-table) under each main record are shown here.
Ex: Order → Order Rows
- Insert Vertical Header Band: Vertical Header Band allows you to display information before duplicate content. It is used in vertical report formats (i.e. those that show records in columns instead of rows).
Used to show headers vertically in vertical reports.
-
Insert Vertical Detail Band: Data display area for vertical format reports.
It is the vertical version of the normal Detail band.
It is especially used in form based (label, survey) reports.
-
Insert Vertical Total Band: It is placed under the data in the Vertical Detail Band.
It is used to show summaries of those details such as total, average, count, etc. It is just like GroupFooter / ReportFooter in horizontal reports, but it is compatible with the vertical structure.
-
Insert Group Footer Band: It comes to the bottom of the groups created with the GroupHeader band. When each group is completed, information such as summary, total, description can be added here.
It is used for group based subtotals.
-
Insert Report Footer Band: The part shown after the Group Footer Band. It can also extend to other pages. It is shown once at the end of the report.
It is usually suitable for content such as grand totals and closing
- Insert Page Footer Band: Repeated at the bottom of each page, just above the Bottom Margin Band, ideal for fixed elements such as page numbers, dates, footers, etc.
-
Bottom Margin Band: This field is already present at the bottom when the design page is opened. It is designed to provide a distance to the bottom of the page to match the printer settings.
If you add a data field, this field will fill with a single piece of data. Just like the Top Margin, data bound fields only work for the first record. It will be the same on all pages because this band does not repeat or group data.
-
Insert Sub-Band: This is an additional auxiliary band under bands such as Detail, GroupHeader, ReportHeader, etc. It is used especially in dynamic content, when you want to show the same field separately in different formats.
Example: Like showing both a table and a chart to a group.
| As seen in the image below, when the Detail band is selected, let's explain the active fields in the Actions tab in a short and simple way: |
Page Break: Determines the page break point.
- None → No page transition is applied. (Default setting.)
- Before the Band → Before this band, the content is started on a new page.
- After the Band → Content continues on the next page after the band is completed.
- Before the Band Except First Entry → A new page is started before all other entries, except the first entry only.
- After the Band Except Last Entry → A new page is started after each recording, except the last recording.
Keep Together:
Should the contents of the band be displayed in one piece without being split at the end of the page?
- If active → If the band does not fit, it moves completely to the next page.
- If Passive → Content can be split at the end of the page.
Fill Empty Space:
Fills the space at the end of the page with the band content (extends the content).
Especially used to fill the remaining space on the last page of the report.
By stretching the band content vertically, the page appears fuller.
Sort Fields: Determines by which field the data in the Detail band will be sorted.
Multi-Column Options Controls:
Allows data to be displayed in more than one column.
Column Count
➤ How many columns to use (for example: 2 or 3).
Column Width
➤ The width of each column.
Column Spacing
➤ Space between columns.
Layout
➤ Direction in which the data is filled:
- AcrossThenDown: First horizontal, then vertical
- DownThenAcross: First vertical, then horizontal
Mode
➤ What the column layout will work according to (for example, the whole page or a specific group?).
|
As seen in the image above, when a field of the report is selected, let's explain the fields that are active in the Actions tab in a short and simple way: Text: This field allows assigning a visible name/data to the component. Text Format String: Defines the format of the data to be displayed. |
Examples:
- {0:C} → Currency (₺10,00)
- {0:dd.MM.yyyy} → Date (26.05.2025)
- {0:N2} → Number (2 digits after comma)
Summary:
1)Running: Determines the scope in which the report will run.
- None → No calculation is performed.
- Report → Calculation is made throughout the report (for example, total on all pages).
- Group → Calculation is done within groups (e.g. total for each customer).
- Page → Calculate on a page-by-page basis (for example, to print the page total at the bottom of each page).
2)Ignore Null Values: If True, null values are not included in the calculation.
3)Treat Strings As: Treat text expressions as numeric operations? Its use depends on customization scenarios.
Can Grow: Allows the component to auto-grow downwards when the content is long.
Can Shrink: Allows the component to shrink in height when the content is short.
Multiline: Allows moving to more than one line in a text box.
13) Appearance section:
The "Appearance" section is used to set the visual style of the elements in your report (labels, tables, headings, etc.). This section allows you to determine how the elements will appear and serves the following purposes.
-
Background Color
Sets the background color of the element.
-
Border Color
Specifies the color of the item's borders.
-
Border Dash Style
Determines the style of the border lines. Options: Solid (solid), Dash (dashed), Dot (dotted), DashDot (mixed).
-
Border Width
Determines the thickness of the borders (unit: pixels).
-
Borders
Determines which borders are drawn. Options: Top, Bottom, Left, Right, All.
-
Font Name
Specifies the font. For example: Arial, Tahoma, Times New Roman.
-
Font Size
Specifies the font size.
-
Font Unit
The unit used for type size. Usually Point (pt).
-
Foreground Color
Specifies the font color.
-
Padding - All
Gives equal internal space from all edges.
-
Padding - Left
Sets the internal space from the left edge.
-
Padding - Right
Sets the internal space from the right edge.
-
Padding - Top
Sets the internal space from the top edge.
-
Padding - Bottom
Sets the inner space from the bottom edge.
-
Page Color
Sets the background color of the report page.
-
Text Alignment
Sets the horizontal and vertical alignment of the text. Horizontal: Left, Center, Right. Vertical: Top, Middle, Bottom.
| When XtraReport is selected in Properties field, Watermark field becomes active and some of the text or image settings to be placed in the background of the report can be made from this field. |
| When a report field is selected on the design, the ‘Text Trimming’ property is active in the Appearance section. This feature allows you to control how to behave when the text content exceeds the size of the field. |
- None: The overflowing text is not trimmed, it can overflow out of the field.
- Character: Text is trimmed at character level. Characters that do not fit are hidden.
- Word: Text is clipped at the word level. No half words are left, only full words are shown.
- EllipsisCharacter: When text does not fit, it is truncated by appending it at the end (character level).
- EllipsisWord: When text does not fit, it is truncated by appending it at the full word level.
- EllipsisPath: Especially used in texts such as file path. Cut in the middle and ... inserts.
14) Behavior section:
The "Behavior" section allows you to specify how a report item behaves, i.e. its interactional properties and logic of operation. This section is used to manage not only the appearance of the item, but also its behavioral aspects such as export, script-based functionality, data binding, etc.
In this section, we first examine the existing features for controlling the appearance and data behavior of report components.
- Angle: Metnin döndürülme açısını belirler. Örneğin, metni dikey yazmak istersen 90° verebilirsin.
- Allow Markup Text: HTML benzeri etiketleri kullanarak metin biçimlendirmeye olanak tanır. Örneğin, <b>metin</b> kalın olarak görünür.
- Can Grow: Metin kutusu içeriğe göre aşağı doğru büyüyebilir. Özellikle uzun açıklamalar için kullanılır.
- Can Shrink: Metin kutusu içeriğe göre küçülebilir. Eğer veri kısaysa, alan fazla boşluk bırakmaz.
- Can Publish: Bu öğe dışa aktarımda (PDF, Excel) yer alsın mı, almasın mı onu belirler.
- Keep Together: İçeriğin sayfa sonlarında bölünmeden tek parça olarak gösterilmesini sağlar.
- Multiline: Metin birden fazla satıra geçebilir. Satır sonlarında otomatik olarak alt satıra iner.
- Process Duplicates: Bu özellik, aynı veri tekrar tekrar geliyorsa nasıl görüntüleneceğini belirler.
Leave: Each repeating value is shown as is. This is the default behavior.
Merge: Cells that are identical are visually merged into a single cell.
Suppress: The first value is shown, subsequent repeats are hidden, but the cell takes up empty space.
Suppress and Shrink: Repeating values are hidden and the cell/row is completely shrunk.
- Process Duplicates Target:
Value: Comparison is based on the contents of the cell.
Tag: Comparison is based on the specific data assigned to the "Tag" property of the cell.
- Process Null Values:
Leave: The cell appears empty even if there is no data.
Suppress: If there is no data, the cell is hidden but the space is still occupied.
Suppress and Shrink: If there is no data, both the cell is hidden and the space is shrunk, providing a more compact appearance.
- Row Span: Determines how many rows the table cell will span. Used to join cells vertically.
- Text Fit Mode: If the text does not fit in the box, it is automatically shrunk to fit.
- Visible: Determines whether the item is visible or not. Can be used to dynamically toggle visibility on and off.
- Word Wrap: Allows long text to move to the bottom line if it exceeds the box size.
'SCRIPT' Field:
Before Print and Summary Calculated are the most frequently used fields.
Draw, Print on Page, Evaluate Binding come into play for more advanced needs.
Especially in dynamic reports such as tickets, many details such as text color, visibility, data formatting can be controlled with BeforePrint.
-
After Print
➤ The component works after printing.
It is generally used for logging or cleaning after printing.
-
Before Print
➤ Triggered before the component is printed.
It is the most used event. Operations such as conditional formatting, visibility, value change are done here.
-
Location Changed
➤ Fires when the location (X/Y) of the component is changed.
It is generally used very rarely.
-
Parent Changed
➤ Runs when the component is moved to another container.
Can be used when working with nested structures.
-
Size Changed
➤ Triggered when the width or height of the component changes.
Suitable for special size-based edits.
-
Draw
➤ Works while the component is being drawn (rendered).
Special drawings or graphical operations can be performed.
-
Evaluate Binding
➤ Runs while evaluating the Data Binding operation.
It is used to intervene at the moment the data is bound.
-
Print on Page
➤ Triggered when the component is printed on a specific page.
Suitable for page-based operations. Ex: Tags that need to be hidden on certain pages.
-
HTML Item Created
➤ Runs when HTML output is created (used in Web reports).
Provides customization for web reporting.
-
Text Changed
➤ Runs when the text of the component is changed.
Generally used in components that work dynamically with the data set.
-
Summary Calculated
➤ Runs after the summary is calculated.
Ideal for checking calculated values such as totals, averages, etc.
-
Summary Get Result
➤ Summary runs just before the value is calculated.
Used to add custom logic before calculation.
-
Summary Reset
➤ Triggered before the summary value is reset.
If the summary needs to be reset in grouping or at the beginning of a page, it is intervened here.
-
Summary Row Changed
➤ Runs when the data row used in the summary calculation changes.
Suitable for summary calculations that require row-based processing.
‘EDIT OPTIONS’ Field:
This field allows the user to edit the report output in Web Report Designer or Document Viewer. It is especially used in scenarios such as survey forms and interactive reports.
-
Enabled
➤ Can this item be edited by the user?
If set to Yes, the user can modify this item during report viewing (e.g. enter text in a text box).
-
ID
➤ This is the unique ID of the editable field.
It is used to keep track of which field has been modified when updating data.
-
Read Only
➤ Makes the item read only.
If Yes is selected, the user cannot edit but the data will be displayed.
-
Editor Name
➤ Determines which type of editor (text box, checkbox, etc.) will be used.
For example, controls such as TextBox, CheckBox, DateEdit can be assigned.
‘INTERACTIVE SORTING’ Fields:
This feature allows the user to sort the report by clicking on the column headers while viewing the report.
It can be used if you want to add a clickable sorting feature so that the user can review the report more easily. It is especially useful for tables.
-
Target Band
➤ Which band (detail, group, etc.) will be sorted?
Usually Detail band is selected because sorting affects these rows.
-
Field Name
➤ Which field will be sorted by?
Select a field in the data source (e.g. Price, Date, Name). When the user clicks on the header of this column, ascending/descending sorting is done.
|
As seen in the image above, when TopMargin and Bottom Margin1 band is selected, only these two fields are active in the Behavior tab:
|
| For some structural bands such as TopMargin, Bottom Margin (except Detail) the behavior options are limited, so other Behavior settings (Can Grow, Process Duplicates etc.) are not included here. |
|
As seen in the image above, when the Detail band is selected, let's briefly and simply explain the fields that are active in the Behavior tab: Drill-Down Controls: Drill Down Control |
Behavior Controls:
-
Fill Empty Space
➤ If there is empty space on the page where the band is located, it fills that space.
It is used especially if you want to leave no space on the last page.
-
Keep Together
➤ It is activated if you want the entire content of the band to be shown as a single piece and not split at the end of the page.
-
Page Break
➤ Sets a page break point.
Options:
None: No break
Before the Band: Before the Band, let the page break, let it end.
After the Band: Break page after the band, end.
Before the Band Except First Entry: Break page before the band every time except for the first entry.
After the Band Except Last Entry: Break page after the band every time except last entry.
Hierarchy Print Options Controls:
Used for hierarchical (tree structured) data. For example: Category → Subcategory → Product.
-
Child List Field
➤ Field containing child items (sub list).
-
Key Field Name
➤ Unique key assigned to each item
-
Parent Field Name
➤ Field indicating which item is dependent on which parent item.
-
Indent
➤ How far in (amount of indent) items in lower levels start.
-
Keep Together
➤ Hierarchy blocks should not be split at the end of the page.
Multi-Column Options Controls:
Allows data to be displayed in more than one column.
-
Column Count
➤ How many columns to use (for example: 2 or 3).
-
Column Width
➤ Width of each column.
-
Column Spacing
➤ Space between columns.
-
Layout
➤ Direction of data filling:
AcrossThenDown: First horizontal, then vertical
DownThenAcross: First vertical, then horizontal
-
Mode
➤ How the column layout will work (e.g. whole page, specific group?).
|
As seen in the image above, when XtraReport (Report) is selected, let's explain the fields active in the Behavior tab in a short and simple way: General appearance and behavior settings of the report: Display Name |
| If the Form Design is displayed in the field named Display Name in the Behavior section on the right (Properties > XtraReport), the name of the downloaded document will be dynamic according to the data in this field. If this field in the query has an equivalent with Alias, it should be written. |
- Measure Units
➤ Unit of measure (Inch, Centimeter, Pixel, etc.). - Request Parameters
➤ Will the parameters of the report be passed to the data source? (Usually checked.) - Show Margin Lines
➤ Show/hide page margin lines on the design screen. - Vertical Content Splitting
➤ Determines how the content reacts to vertical page splitting. - Visible
➤ Whether the report will be visible or not. (Usually remains constant True.) - Script Language
➤ The scripting language to be used in the report (C# or VB.NET).
‘SCRIPT’ Controls
Fields that operate at the report level. There can be many sub-headings as follows:
- Before Print
- After Print
- Parameters Request Before Show
- Data Source Demand
- Script Error, vs.
General operations, data preparation, error trapping, etc. can be done in these areas.
'SCRIPT REFERENCES' Control:
This field looks like an empty notepad.
Here you can write the paths (references) of additional script files included from outside.
Example: If you want to make use of other classes or methods, this is the place to refer to. It is usually used in advanced projects.
'EXPORT OPTIONS' Controls:
These are detailed settings that determine how the report behaves when exporting to different formats (PDF, Excel, Word, Email, etc.).
Some headings and sub-headings:
- PDF Options
➤ Page size, compression, security settings, etc.
- Excel Options
➤ Cell merging, auto-width, table style, etc.
- E-Mail Options
Recipient: Mail recipient
Subject: Email subject
Body: Email content
- Other formats such as HTML, Image, RTF, Text also have separate sub-settings.
16) Data:
Data Source: This is where the data source from which the report will be fed is determined.
Data Member: This is where you select which table, query or collection in the DataSource will be used.
Filter String: With this field you can filter the data. It is used to show only data that meets certain criteria.
Calculated Fields: This field creates new virtual fields by making mathematical or logical calculations from the fields in the data source.
Parameters: In this section, parameters are defined to dynamically filter or customize the report by taking values from the user.
“To create an item click the add button”
This message indicates that a parameter has not yet been added and the “+” (Add) button must be clicked to create a new one.
16) Design:
The Design tab controls the behavior and appearance of the report in the design environment.
Snap Grid Size: This setting determines the size of the grid system used when snapping report elements.
Draw the Watermark: This option determines whether to show a watermark during the design phase (before the report is displayed or printed).
Language: This setting determines in which language the report will be designed if it supports multi-language.
| Navigation and Printing are only active when an area of the report is selected. |
17) Navigation:
The Navigation feature is used to increase user interaction and facilitate navigation within the report. It provides a solution to the need to “click somewhere and go somewhere else”, especially in large, multi-page or hierarchical reports.
Through Navigation settings in a report:
- When the user clicks on an item, they can be redirected to another page, another area of the report, or an external URL.
- Internal links (such as bookmarks) or external links (such as URLs) can be created within the report.
1. Bookmark
- This field defines a bookmark specific to that item.
- It can be used as a reference to a specific region within the report.
- Example: If you put “Bookmark = CHAPTER1” in a chapter title, you can link to this bookmark from elsewhere.
2. Parent Bookmark
- Used to establish hierarchy in the bookmark structure.
Sub-headings can be grouped under top headings.
Creates a tree view in the Bookmark panel.
3. Navigation Target
- This field specifies where it will go when clicked.
Usually another bookmark name is written here.
For example: If Navigation Target = “PART1”, the report jumps to the “PART1” bookmark when the user clicks on that item.
4. Navigation URL
- This field is used to redirect the clicked item to the web address.
For example: https://www.google.com will open this URL in the external browser when clicked.
There can also be links with parameters: https://site.com/user/{UserID}.
18) Printing:
- The Printing area contains settings that determine how report elements (label, tablecell, etc.) behave when printing or exporting. These settings are especially important when exporting (PDF, Excel) and printing.
-
This field is activated when clicking on a data field (e.g. a table cell) because this setting only applies to visual elements included in the output.
This property controls the text orientation of the element: - Inherit: Uses whatever comes from the parent container (report or band).
- Yes: The text of this element is aligned right to left (suitable for RTL languages).
- No: Text is aligned from left to right (default).
- In languages such as Arabic, Hebrew: RightToLeft = Yes to make the text look natural. If only one field is in Arabic but the others are in Turkish/English, Yes is given for that cell only.
Selecting Inherit is based on the RightToLeft setting of the parent component (e.g. Detail band or the whole report).
| The Page Setting section is only active when the report itself, i.e. (XtraReport(Report)), is selected in the properties field. |
19) ‘Page Setting’:
-
Landscape
Sets the orientation of the page.
True: Landscape
False: Portrait
-
Roll Paper
Set for continuous roll paper use.
True: Page length is not limited (usually for dot matrix printers).
False: Standard fixed page length is used.
-
Page Width
Specifies the width of the page (unit is usually millimeters or inches).
This value can be custom set if RollPaper is enabled.
-
Page Height
Specifies the height of the page.
If RollPaper = True, this value has no effect.
-
Paper Kind
Allows you to select the page size with predefined dimensions.
Example: A4, Letter, Legal, Custom, etc.
The selected value automatically determines the Page Width and Page Height values.
-
Margins
Specifies the margins of the page.
Top: Top margin
Bottom: Bottom margin
Left: Left margin
Right: Right margin
Report content is not placed in these spaces, the printer does not use these fields.
- Landscape: Landscape is preferred for large tables.
- Roll Paper: Required for continuous form printouts.
- Page Width & Height: Changed when it is necessary to use special size paper.
- Paper Kind: For output compatible with standard printer page sizes.
- Margins: Important for regular alignment and not overflowing from the printer.
Bar-Code Object:
1) On the report design screen, find the BarCode control in the Toolbox section on the left panel.
2) Drag and drop to the desired area on the report.
3) The barcode object you added becomes part of the report.
4) After selecting the barcode object, go to the Symbology field in the Properties window.
Here are some of the barcode types you can use:
You should choose this type according to your project.
-
Code128
The most commonly used barcode type. It offers wide character support, including numbers, letters and special characters. Suitable for both short and long data.
-
Code39
Supports letters and numbers. Because its characters take up more space, the same data produces a longer barcode than Code128.
-
EAN13 / EAN8
Standard barcode formats used especially in the retail sector (such as grocery products). EAN13 has 13 digits and is usually found on product packaging.
-
QR Code
It is a square barcode type. It supports data types such as URL, text, e-mail. Easily readable with smartphones and mobile apps.
-
PDF417
2-dimensional barcode type. It can store much more data (e.g. credentials, address). Can be used on official documents or ID cards.
-
UPC-A / UPC-E
Widely used on American based retail products. UPC-A is 12 digits, UPC-E is the abbreviated version.
-
Codabar
Barcode type compatible with healthcare, library systems and some legacy systems. Easy to create and fast to scan.
5) To connect the data to the barcode, click on the Field List field on the right side and go to the ‘Data Source List’ field, open the relevant table and drag the field to the barcode element on the design screen.
- Auto Module: Allows the barcode to be sized automatically (True/False).
- Module: Determines the width of each line (especially for QR Code).
- ShowText: Sets whether to show text under the barcode (True/False).
- TextAlignment: Sets the alignment of the alt text.
- Padding: Sets the internal spacing of the barcode.
- ForeColor / BackColor: You set the foreground and background color of the barcode.
| The area of the barcode must be large or big enough so that it does not overflow. If you try to fit a lot of data in a small area, the barcode will become unscannable. The width of the area is especially important for Code128 and QR Code. |
| When using the Bar Code tool in Output Design, if the tool’s SYMBOLOGY property is set to QRCode, the Compaction Mode must be selected according to the data type that will be entered into the field. |
The table below shows the appropriate mode option based on the data type:
| Data Type | Recommended Mode |
|---|---|
| Numbers only | Numeric |
| Uppercase letters + numbers + limited special characters | AlphaNumeric |
| Values containing lowercase letters | Byte |
| Texts with Turkish characters | Byte |
| Mixed content such as URL, JSON, GUID | Byte |
| Content is variable or unknown | Byte |
Table Object :
The Table toolbox allows you to create tables easily. You can design the table you want with buttons such as delete, add rows, add cells in the Actions area in the Properties section.
SubReport Object:
1) First, let's create two tables, Categories and Products
Domain names are shown in the image below.
Category Table :
2-) Let's add 3 categories to this Categories table.
3) Products Table:
4) Let's add products belonging to 3 related categories to this products table.
5) From the Client screen where the categories are defined, let's create and save two output designs by clicking the Form (CTRL + F) key.
An output named MainReport was created, another output named Subreport was created by following the same steps in the example. It is shown below on the Report File List screen.
Let's design both outputs, first let's design the output named subreport. Let's click on Subreport, the design page will open, write the query that we will get the product data from the Add new file field and save it.
The newly opened report will not be a data source. To do this, let's first connect the Data member, then open the data source list screen by clicking on the field list on the right (No:4 in the image below), select the table from which the relevant data will be taken, click on the fields and drag the fields we want to drag to the design.
The next step is to define parameters. While Properties section XtraReport(Report) is selected, go to Actions section, click on the 3 dot icon on the right side in Filter String field, Filter Editor page will open.
In the editor that opens, click on the + sign next to the editor and add a condition.
We have defined the parameter, save the design, exit.
To prepare the MainReport output, go to the Report File list and open it by clicking on it. MainReport and SubReport files should be opened and edited separately from the design list.
Click on MainReport and the design page will open. Let's write and save the query that we will get the product data from the Add new file field.
Let's connect the Data Member by following the steps below and drag the relevant fields to be dragged to the design. Then drag the ‘subreport’ tool to the detail band of the design.
Then click once on the subreport1 field in the main report and enter properties. Associate CategoryName in the query we wrote the Category table with the Description (CategoryIDConnection) of the parameter you named CategoryName by clicking the ‘’ + ‘’ sign in the PARAMETER BINDINGS field under the DATA property.
Parameter Name: CategoryIDConnection
Binding = CategoryName (field in Category query)
Save the Main Report and exit.
You can check the image by clicking the print button from the Client screen where the Categories table is located, that is, from the Client screen where the Categories are defined, and selecting the layout design.
Now your products are sorted by categories.
Adding Font to Output Design:
First of all, the font files with the .ttf extension to be used should be added to the Webfonts folder on the server where the application is installed.
The same font files must be installed on the operating system on user computers. Otherwise, the output will not be displayed correctly.
After these steps are completed, the relevant code should be added to the Add Script field on the Output Design creation screen and the output should be run. Thus, the texts in the report will appear with the selected font.
1)Change the Font of the Entire Output:
To replace the default font in the entire report file, the following script must be added to the script page of the output:
using Xpoda.Client.Models;
private void XtraReport_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
var report = sender as XtraReport;
if (report == null) return;
XpodaFontManager.ApplyDefaultFont(report, "Montserrat", 30f);
}Note: The new font name to be used instead of "Montserrat" should be written.
2)Change the font of just one field:
The following script can be used to change the font of a specific area:
using Xpoda.Client.Models;
private void label1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
var label = sender as XRLabel;
XpodaFontManager.ApplyFontToControl(label, "Montserrat", 12f);
} Note: The new font name to be used instead of "Montserrat" should be written.
Example 1:
In the example below, a form linked to the TTF_TrueTypeFont table is designed to enter student information. A field has been added on the form where the student can select his class, and input boxes where he can enter his number and name. In addition, there is a Save button to save the records to the table and a Print button to print out the report of the entered data.
The necessary action has been given to the Print button on the form, so that when the button is pressed, the defined output design will work.
Then, by switching to the client screen of the form, the output design page was opened, the necessary script was added and the design was created as follows.
Steps to Add a Script:
In order for custom fonts to be applied to the report, the relevant code must be added to the script page of the output. To do this, follow these steps:
- Open the script pageClick the script icon (📜) from the top menu on the output design screen.
- Select the target objectIn the window that opens, XtraReport (Report) should be selected from the top left.
- Select BeforePrint from the drop-down menu next to Specify the event.
- Add the codeAdd the following sample code to the code field and ✔️ save it by clicking the sign:
After the output is saved, when you return to the client screen and call a record and press the Print button, the output with the custom font applied with the script added will be displayed as follows.
Below is the output view created with the default font, where no font change is applied because no script has been added.
|
|
Script code must be added for the Rich Text tool you use in your output designs to work properly. Click on the link for the detailed explanation document, Using Rich Text in Output Design |