Page Tree
Other Releases
Easy Heading Macro | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Info | ||||
---|---|---|---|---|
| ||||
This document provides information on how to format individual cells in a DataGrid dynamically and print them in a Report. | ||||
Info | ||||
| ||||
Quick video tutorial. (no audio) |
Table cells can be dynamically colored by using the input parameters of the Callback Function. You can filter tables by ColumnName and Rows.
To use this feature, you will need to add a callback function into in the ClientMain Class class that is called every time the DataGrid is modified.
...
Code Block |
---|
public void OnReportCustomTableCell(string reportName, string columnName, System. Data.DataRow row, System.Windows.Documents.TableCell tableCell) { // Insert Code Here } |
In this example, we will add the following table to our Reportreport:
Sample Table.
It is possible to dynamically color the Table Cells using the input parameters of the Callback Function. You can filter by ColumnName and Rows.
The code below shows an example of how this feature can be implemented.
...
The result achieved by the example code is presented in the image below.
Colored Sample Table.
The new Colored colored DataGrid is added into the Report report following the same logic as before.
You will need to insert Insert a table , with the correct number of columns and only TWO rows. In the first column you will , write the text that will appear as Column Name be the column name in the printed report.
In the second column you will , write the correct Column Name as column name that is in the Databasedatabase.
How to add a Table to a Report.
Since the callback function is placed into the ClientMain Classclass, the Reports reports containing DataGrids will only be colored if the Report report is being saved in by one of the following methods:
Report save properties.