|
|
|||
Home Products Downloads Registered users Support Prices Order Primary Subscription |
|
||
TxlReport PropertiesActiveSheet published read/writeSets or retrieves the name of the worksheet to be activated after report generation.
property ActiveSheet: string;
For a report with several worksheets, you should provide this property to guarantee the activation of a certain worksheet. If this property is empty then XL Report activates the worksheet that was active in the saved template. Example:
Report.ActiveSheet := 'Main sheet';
DataExportMode published read/writeDetermines the algorithm of data transfer.
property DataExportMode: TxlDataExportMode; type
TxlDataExportMode = (xdmCSV, xdmVariant, xdmDDE);
XL Report supports three alternate data transfer modes: xdmDDE (default), xdmVariant, xdmCSV.
Example:
Report.DataExportMode := xdmVariant;
DataSources published read/writeTCollection descendant that contains data sources participating in report generation.
property DataSources: TxlDataSources;
Each item (of TxlDataSource type) determines a certain dataset, its properties, and flags. Use standard methods to get access to the items, to add or delete them. To add items, we recommend you to use AddDataSet method of TxlReport class. Example:
Report.DataSources[i].Range := 'OrdersRange';
See also descriptions of TxlDataSource and TxlDataSources classes below. Debug public read/writeTurns on (off) the report debug mode.
property Debug: boolean; default false;
If you set this property to True (default - False), XL Report will generate a report visualizing the changes to the report and allowing access to the hidden worksheet as well as VBA module in the report. MacroAfter published read/writeSets or retrieves the full name of the VBA procedure to be called after report generation.
property MacroAfter: string;
Full name includes module name, dot and procedure name. The procedure must be declared public. Example:
Report.MacroAfter := 'Module1.BuildChart';
In order to pass parameters to the procedure see the OnMacro event. MacroBefore published read/writeSets or retrieves full name of the VBA procedure to be invoked before report generation.
property MacroBefore: string;
The full name includes module name, dot and procedure name. The procedure must be declared public. Example:
Report.MacroBefore := 'Module1.DoBuildRange';
In order to pass parameters to the procedure see OnMacro event. MultisheetAlias published read/writeRetrieves or sets the alias of the main dataset of a multiple-sheet report.
property MultisheetAlias: string;
XL Report allows creating multiple-sheet reports where each record of the main dataset specified in this property causes creation of a separate worksheet named after the value of the designated field (see MultisheetField property). MultisheetField published read/writeRetrieves or sets the field name being used as a source of sheet names in a multiple-sheet report.
property MultisheetField: string;
XL Report allows creating multiple-sheet reports where each record of the main dataset specified in the MultisheetAlias property causes creation of a separate worksheet named after the value of the field specified in this property. Options published read/writeContains report generation options.
property Options: TxlReportOptionsSet read FOptions write SetOptions
default [xroDisplayAlerts, xroAutoOpen];
type
TxlReportOptions = (xroOptimizeLaunch, xroNewInstance, xroDisplayAlerts,
xroAddToMRU, xroAutoSave, xroUseTemp, xroAutoOpen, xroAutoClose,
TxlReportOptionsSet = set of TxlReportOptions;
xroHideExcel, xroSaveClipboard, xroRefreshParams); xroAddToMRU - adding the report to the MRU list (default False) Turn this option on in order to add a report to the list of most recently used workbooks (MRU). Can be useful if you plan to work with the report after the application closes. xroAutoClose - automatically closing datasets (default False) Setting this option to True will automatically close all datasets engaged in report generation immediately after their use. Attention! Changing this flag leads to the same change of the xrgoAutoClose flag for every item in the DataSources collection. xroAutoOpen - automatically opening datasets (default True) Setting this option to True will automatically open all closed datasets engaged in report generation. If this option is False and a dataset is not open - an exception is raised. Attention! Changing this flag leads to the same change of the xrgoAutoOpen flag for every item in the DataSources collection. xroAutoSave - saving a report workbook automatically (default False) By default, XL Report generates a report without saving it. The user may pay attention to the warning message appearing before closing a report workbook. Turn this option on in order to save a report and prevent this message appear. The xroUseTemp option and TempPath property affects report saving. If the TempPath property is set, the report will be saved in the path specified in this property. If not, the report will be saved in the current folder of the application. If xroUseTemp = True, the saved report will be marked as a temporary file of XL Report. When the application closes, such files are deleted. If xroUseTemp = False, the saved report isn't deleted under the assumption that they will be used after the application closes. xroDisplayAlerts - suppressing Excel warnings (default True) This option is a complete analog of the Excel.Application.DisplayAlerts property. If false, suppresses Excel prompts and alert messages, for instance, while attempting to write over existing file. xroHideExcel - creating a report in background (default False) Set this option to True if you need to create a report in background mode (an invisible report). This works if (and only if) the report is built in the Excel instance created by XL Report. You should set the xroAutoSave to True and define the path in the TempPath property. The report is closed immediately after generation. xroNewInstance - using a new or existing instance of Excel (default False) By default, XL Report creates a report using an existing instance of Excel. If there are no such instances, XL Report creates a new instance. You may need to turn this option on in order to prevent interference with the Excel instance launched by the user or by your application. xroOptimizeLaunch - optimizing the namber of Excel launches (default True) If xroOptimizeLaunch is on an instance of Excel.Application is created during first report generation and is kept connected with till the application closes. You can break the connection and release the Excel instance by invoking the TxlReport.ReleaseExcelApplication class method. This approach allows saving the time in case of multiple Excel launches. If you have a few reports in your application, set this option to False. Be sure to set it to False if you use XL Report in a DLL or in a run-time package. xroRefreshParams - refreshing the Params collection (default False) XL Report allows transferring into the report the data defined in the Params collection. This option controls the automatic refreshing of the collection. If it is set to True, XL Report, starting report generation process, will empty the collection, open the report template, find all the formulas on the XLRParams_paramname pattern, and fill the Params with the parameters found. TxlReport.Params is much like TQuery.Params. The difference is: TQuery.Params is refreshed when the SQL property changes, while TxlReport.Params is refreshed before the report generation and if the xroRefreshParams option is on. xroSaveClipboard - preserving the clipboard contents (default False) XL Report algorithms as well as Excel methods use the Clipboard extensively. By default, the clipboard content isn't preserved while generating a report. Set this option to True if you need to preserve it. Attention! Some Excel methods of all versions contain several regrettable bugs causing incorrect cell formatting in a report. If you found such a behavior, turn off this option. xroUseTemp - marking a report as a temporary (default False) If xroUseTemp = True, the saved report will be marked as a temporary file of XL Report. See the xroAutoSave option. Params published read/writeSets or retrieves the path and file name of the template workbook.
property Params: TxlReportParams;
XL Report allows transferring individual values to a report. It keeps them as TxlReportParam instances in the Params collection. You use standard methods to change the contents of this collection or to get access to its items. TxlReportParam exposes only two properties - Name (String) and Value (Variant). The formula on the XLRParams_ParamName pattern in the template will be replaced with the value of the ParamName parameter in the report. The contents of the Params collection can be influenced by the state of the xroRefreshParams option. ParamByName published read onlyRetrieves a pointer to the report parameter by its name.
property ParamByName[Name: string]: TxlReportParam;
XL Report allows transferring individual values to a report. It keeps them as TxlReportParam instances in the Params collection. You use standard methods to change the contents of this collection or to get access to its items. TxlReportParam exposes only two properties - Name (String) and Value (Variant). The formula on the XLRParams_ParamName pattern in the template will be replaced with the value of the ParamName parameter in the report. The contents of the Params collection can be influenced by the state of the xroRefreshParams option. Preview published read/writeIf set to True, show the report in preview.
property Preview: boolean; default false;
TempPath published read/writeSets or retrieves the name of the folder to keep XL Report temporary report files.
property TempPath: string;
XL Report allows placing temporary report files at a separate folder. You specify the folder in this property. If the folder doesn't exist, an exception is raised. Temporary report files are created only if the xroUseTemp option is on. They have the xlrtmp extension. When the application finishes, all temporary files will be deleted. XLSTemplate published read/writeRetrieves the collection of report parameters.
property XLSTemplate: string;
If you omit the path, XL Report will seek the template workbook in the start folder of the application (at run-time). At design-time, XL Report seeks the workbook in the project folder. Relative paths are allowed. In such a case, the path is considered as relative to the start folder at run-time or the project folder at design-time. |
Components
Developed forDelphi 4, 5, 6, 7 Excel version supportedMS Excel 97 (SR2)
[ Download it ] |