|
|
|
|
|
- Overview
- Initializing a Spreadsheet control in a report
- Properties specific to the management of Spreadsheet control in a report
- "Before printing cell" process
Handling Spreadsheet controls programmatically (in a report)
A Spreadsheet control found in a report can be handled through programming. - If the Spreadsheet control is linked to no data, it can be initialized through programming.
- Several properties can be used to manage a Spreadsheet control in a report.
- The "Before printing cell" process is used to modify the cells of the Spreadsheet control.
Remarks: - No cell can be created during the print. The print must be performed from the Spreadsheet control found in a window or from an Excel document.
- The height and width of the cells, rows or columns cannot be modified.
Initializing a Spreadsheet control in a report To initialize a Spreadsheet control found in a report through programming, all you have to do is assign the Excel file to the control (in the opening process of the report or in the initialization process of the control for example). <Name_Spreadsheet_control> = <File name> For example: PSHEET_Statistics = "Show2015.xlsx" Properties specific to the management of Spreadsheet control in a report The following properties are used to manage the Spreadsheet controls in the reports:
| | AdjustmentMode | The AdjustmentMode property determines and changes how a Spreadsheet control is adjusted in a report. | GridlinesVisible | The GridlinesVisible property is used to: - Determine whether or not gridlines are visible in a control.
- Show or hide gridlines in a control.
| PrintArea | The PrintArea property is used to get and change the print area of a Spreadsheet control in a report. | PrintedSheet | Within a report, the PrintedSheet property is used to get and change the sheet of a Spreadsheet control to be printed. |
"Before printing cell" process The "Before printing cell" process is a process associated with the Spreadsheet control in the reports. This process is used to customize the characteristics of the cells found in the Spreadsheet control. You can use: - the MySelf keyword to get the name of the current cell.
- the MySelf[MySelf] syntax to get the content of the cell.
Tip: MySelf[MySelf] corresponds to an xlsCell variable. All the properties of this variable type can be used and they allow you to modify the characteristics of the cell. Example: MyFont is Font MyFont.Name = "Comic Sans MS" MyFont.Size = 10 MyFont.Bold = True MyFont.Underline = True MyFont.Color = PastelBlue  ABorder is Border ABorder.Line = LineDotAndDash ABorder.Thickness = 1 ABorder.Edges = BorderAll  IF MySelf [= "B" THEN MySelf[MySelf].BackgroundColor = PastelOrange IF Right(MySelf[MySelf],1) = 8 THEN MySelf[MySelf].Font = MyFont END IF Right(MySelf[MySelf],1) = 6 THEN MySelf[MySelf].Border = ABorder END IF Right(MySelf[MySelf],1) = 2 THEN MySelf[MySelf].Value = "RESET" MySelf[MySelf].Font.Color = Black MySelf[MySelf].Font.Size = 13 END END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|