Products Downloads


French version


 

 

      

      

VADELIA (Cloud)

      

      

 

 

(B) (C)

 

 

 

Warning: "CLOSE LayoutCode" can only be used in the client part of an Adelia Cloud program with a report.

 

Section for use

All

 

Syntax

CLOSE LayoutCode

CLOSE *PRV LayoutCode

CLOSE File LayoutCode

CLOSE Download LayoutCode

 

File

*FILE(FileName) | None

     

FileName

'AlphaConstant' | AlphaVarId

     

Download

*DOWNLOAD | *DOWNLOAD(DocName) | None

     

DocName

'AlphaConstant' | AlphaVarId

 

Description

This instruction is used to manage the closing of layouts in a program. If it is necessary to manage layout opening or closing yourself, you need to modify the default generation options and indicate that you are managing opening.

 

The explicit closing of a layout file makes it possible to modify standard behaviour through the available options. Implicit closing makes it possible to either print a report on the print server (server associated with the *WEB_REPORT logical server) or to display in the browser a PDF document (for a Crystal Reports report) and a document in plain/text format (for an Adelia report). The default behaviour is set by the configuration file [wicfgvcr.ini] for Crystal Reports reports, [wicfgva.ini] (execution parameters) for Adelia reports. It can also be done by using the VaToolBx function VaToolBxCloudSetPrinterDefPrintMode for Crystal Reports reports and the VaToolBxCloudSetAdeliaPrinterDefPrintMode for Adelia reports.

 

More generally, the print options are those from the configuration file [wicfgvcr.ini] for Crystal Reports reports, [wicfgva.ini] (execution parameters) for Adelia reports, or those from the dynamic configuration carried out using the functions of the VaToolBx VaToolBxSetPrinter (Crystal Reports reports), VaToolBxSetAdeliaPrinter (Adelia reports) and VaToolBxSetPrinterEx (Crystal Reports reports) and VaToolBxSetAdeliaPrinterEx (Adelia reports).The explicit closing "CLOSE LayoutCode" without additional option plays the same role.

 

*PRV is used to display in the web browser (inline mode) a report in PDF format (Crystal Reports reports) and in plain/text format (Adelia reports) .

"*FILE(FileName)" is used to store the report in PDF format on the Web server (VFS view). In this case, the report is not sent to the Web browser to be displayed there. *FICHIER is only valid for Crystal Reports reports.

 

FileName can be a simple file name or a name preceded by a relative or absolute path. In the case of a simple file name or relative path, the root storage directory is the $(HOME) directory of the VFS. In the case of an absolute path, the storage directory on the Web server corresponds to the specific drive mounted in the VFS.

 

*DOWNLOAD or *DOWNLOAD(DocName) tells the web browser to open the standard download dialogue box. This offers the option to save the PDF document (Crystal Reports reports) or the text document (Adelia reports) on the workstation or choose an application from those available on the workstation to open the document. The document name is "DocName" or "Document" by default.

 

The instruction CLOSE ends the program execution apart from in the case of *FILE or when an error is raised during instruction processing. If there is an error, the reserved word *RETURN_CODE can take the following values:

    • Value between 1 and 9999: error encountered during the production of the report.
    • Value between 10001 and 19999: middleware error (take 10000 off this value to find "classic" middleware errors).
    • Value between 20001 and 29999: error encountered when producing the HTTP response to send the report to the web browser.

 

Par exemple

Print report

CLOSE Report1

 

Store Crystal Reports report in PDF format on the server

CLOSE ReportCR1 *FILE ('dirPDF\Report.pdf')

The "Report.pdf" file is saved in the HOME directory of the VFS.

For a VFS configured in the following way:

<virtualFileSystem name="HOME" fileSystemProviderClassName="com.hardis.wagon.impl.vfs.WagonDefaultFileSystem" rootPath="d:/temp/vfs/user"/>

the file is saved in the web server's 'd:\temp\vfs\user\dirPDF' directory.

CLOSE ReportCR1 *FILE ('c:\reports\Report.pdf')

The 'Report.pdf' is saved in the directory on the C drive mounted in the VFS.

For a VFS configured in the following way:

<virtualFileSystem name="C" fileSystemProviderClassName="com.hardis.wagon.impl.vfs.WagonDefaultFileSystem" rootPath="d:/temp/vfs/fake_c"/>

the file is saved in the web server's 'd:\temp\vfs\fake_c\reports' directory.

 

Downloading the report

CLOSE Report1 *DOWNLOAD

 

↑ Top of page

  • Aucune étiquette