|
|
|
|
|
- Overview
- Initializing a Spreadsheet control in a report
- Properties specific to the management of Spreadsheet control in a report
- "Before printing cell" process
Manipulating Spreadsheet controls programmatically (in a report)
A Spreadsheet control found in a report can be handled programmatically. - If the Spreadsheet control is linked to no data, it can be initialized programmatically.
- 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 Spreadsheet controls in the reports:
| | AdjustmentMode | The AdjustmentMode property determines and changes how a Spreadsheet control is adjusted in a report. | GridlinesVisible | La propiedad GridlinesVisible se utiliza para: - Determina si las líneas de cuadrícula son visibles o no en un control..
- Mostrar u ocultar líneas de cuadrícula en un control.
| PrintArea | En PrintArea obtiene y establece el área de impresión de un control Hoja de cálculo en un informe. | PrintedSheet | Dentro de un informe, la propiedad PrintedSheet se utiliza para obtener y cambiar la hoja de un control Hoja de cálculo a imprimir. |
"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: MoiMême[MoiMême] corresponds to a xlsCell type 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
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|