Saving the Report File in a Specific Folder
This is used to save report file with specific names in specific folders.
The example is using Static names, but it can be extended using variable names as shown in the page where there is the code about how Creating a Timestamp.
In the attached example, the GRAPHICAL PDF FILE it is still stored in the REPORTS FOLDER of ARCO and the data files XMLD is stored in the specific defined folder.
Example of code:
$$Begin Example
$$Declaring Full Path Name
- DECL/CHAR,200, fullPathForTXTFile
- DECL/CHAR,200, fullPathForExcelFile
- DECL/CHAR,200, fullPathForXMLDFile
- DECL/CHAR,200, fullPathForPdfTextFile
 
$$Declaring Folder for different Type of Output
- DECL/CHAR,200, folderForTXTFile
- DECL/CHAR,200, folderForExcelFile
- DECL/CHAR,200, folderForXMLDFile
- DECL/CHAR,200, folderForPdfTextFile
 
$$Declaring FileName for different Type of Output
- DECL/CHAR,200, fileForTXTFormat
- DECL/CHAR,200, fileForExcelFormat
- DECL/CHAR,200, fileForXMLDFormat
- DECL/CHAR,200, fileForPdfTextFormat
 
$$Define Location for different Folders
- folderForTXTFile=ASSIGN/'c:\MyCustomReportFolder\Text_Format\'
- folderForExcelFile=ASSIGN/'c:\MyCustomReportFolder\Excel_Format\'
- folderForXMLDFile=ASSIGN/'c:\MyCustomReportFolder\XMLD_Format\'
- folderForPDFTextFile=ASSIGN/'c:\MyCustomReportFolder\PDF_Format\'
 
$$Define File Name for different Formats
- fileForTXTFormat=ASSIGN/'myTextFileName.txt'
- fileForExcelFormat=ASSIGN/'myExcelFileName.xlsx'
- fileForXMLDFormat=ASSIGN/'myXMLDFileName.xmld'
- fileForPdfTextFormat=ASSIGN/'myPDFTextFileName.pdf'
 
$$Concatenate folder and file name
- fullPathForTXTFile=ASSIGN/CONCAT(folderForTXTFile,fileForTXTFormat)
- fullPathForExcelFile=ASSIGN/CONCAT(folderForExcelFile,fileForExcelFormat)
- fullPathForXMLDFile=ASSIGN/CONCAT(folderForXMLDFile,fileForXMLDFormat)
- fullPathForPdfTextFile=ASSIGN/CONCAT(folderForPdfTextFile,fileForPdfTextFormat)
 
$$Declaring the different Output Format
- V(TEXT)=VFORM/ALL
- V(XLSX_INCR)=VFORM/DME,'XLSX/I',ALL
- V(XMLDA)=VFORM/DME,'XMLD/A',ALL
- V(PDF)=VFORM/DME,'PDF',ALL
 
$$Open The specific file per each output file
- DID(OUT_FILE_TEXT)=DEVICE/STOR,fullPathForTXTFile
- OPEN/DID(OUT_FILE_TEXT),FDATA,V(TEXT),OUTPUT,OVERWR
 
- DID(OUT_FILE_EXCEL)=DEVICE/STOR,fullPathForExcelFile
- OPEN/DID(OUT_FILE_EXCEL),FDATA,V(XLSX_INCR),OUTPUT,OVERWR
 
- DID(OUT_FILE_XMLD)=DEVICE/STOR,fullPathForXMLDFile
- OPEN/DID(OUT_FILE_XMLD),FDATA,V(XMLDf),OUTPUT,OVERWR
 
- DID(OUT_FILE_PDF)=DEVICE/STOR,fullPathForPdfTextFile
- OPEN/DID(OUT_FILE_PDF),FDATA,V(PDF),OUTPUT,OVERWR
 
$$Declare a fake Point
- F(q)=FEAT/POINT,CART,00,0,0,0,0,1
- FA(q)=FEAT/POINT,CART,00,0,0,0,0,1
 
$$Send the POINT to OUTPUT
- T(CORTOL_1)=TOL/CORTOL,XAXIS,-0.1000,0.1000
- T(CORTOL_2)=TOL/CORTOL,YAXIS,-0.1000,0.1000
- T(CORTOL_3)=TOL/CORTOL,ZAXIS,-0.1000,0.1000
- OUTPUT/FA(Q),TA(CORTOL_1),TA(CORTOL_2),TA(CORTOL_3)
 
$$Close the Output Device
- CLOSE/DID(OUT_FILE_TEXT)
- CLOSE/DID(OUT_FILE_EXCEL)
- CLOSE/DID(OUT_FILE_XMLD)
- CLOSE/DID(OUT_FILE_PDF)
 
