Skip to main content

TCustomdxPSExplorer.CreateNewItem(TdxPSExplorerFolder,TBasedxReportLink) Method

Saves the specified report to the specified folder.

Declaration

function CreateNewItem(AParent: TdxPSExplorerFolder; AReportLink: TBasedxReportLink): TdxPSExplorerItem; virtual;

Parameters

Name Type
AParent TdxPSExplorerFolder
AReportLink TBasedxReportLink

Returns

Type
TdxPSExplorerItem

Remarks

Use CreateNewItem to save a report via code. The AParent parameter specifies the folder where the report will be saved. The AReportLink parameter specifies the report link that provides the report data. This method returns the created report item object so you can modify its settings as needed.

By default, the file name is specified by the report’s link ReportTitle.Text property. If this property value is an empty string, the ReportDocument.Caption property is used. If this value is an empty string too, the file gets the report’s link name and the PRS extension is automatically added. Note that if a file with the specified name already exists within the parent folder, the file number in brackets is appended to the file name. For instance, the file may get the ‘NewReport (2).prs‘ name, etc.

See Also