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, fullPathForTXTFileDECL/CHAR,200, fullPathForExcelFileDECL/CHAR,200, fullPathForXMLDFileDECL/CHAR,200, fullPathForPdfTextFile
$$Declaring Folder for different Type of Output
DECL/CHAR,200, folderForTXTFileDECL/CHAR,200, folderForExcelFileDECL/CHAR,200, folderForXMLDFileDECL/CHAR,200, folderForPdfTextFile
$$Declaring FileName for different Type of Output
DECL/CHAR,200, fileForTXTFormatDECL/CHAR,200, fileForExcelFormatDECL/CHAR,200, fileForXMLDFormatDECL/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/ALLV(XLSX_INCR)=VFORM/DME,'XLSX/I',ALLV(XMLDA)=VFORM/DME,'XMLD/A',ALLV(PDF)=VFORM/DME,'PDF',ALL
$$Open The specific file per each output file
DID(OUT_FILE_TEXT)=DEVICE/STOR,fullPathForTXTFileOPEN/DID(OUT_FILE_TEXT),FDATA,V(TEXT),OUTPUT,OVERWR
DID(OUT_FILE_EXCEL)=DEVICE/STOR,fullPathForExcelFileOPEN/DID(OUT_FILE_EXCEL),FDATA,V(XLSX_INCR),OUTPUT,OVERWR
DID(OUT_FILE_XMLD)=DEVICE/STOR,fullPathForXMLDFileOPEN/DID(OUT_FILE_XMLD),FDATA,V(XMLDf),OUTPUT,OVERWR
DID(OUT_FILE_PDF)=DEVICE/STOR,fullPathForPdfTextFileOPEN/DID(OUT_FILE_PDF),FDATA,V(PDF),OUTPUT,OVERWR
$$Declare a fake Point
F(q)=FEAT/POINT,CART,00,0,0,0,0,1FA(q)=FEAT/POINT,CART,00,0,0,0,0,1
$$Send the POINT to OUTPUT
T(CORTOL_1)=TOL/CORTOL,XAXIS,-0.1000,0.1000T(CORTOL_2)=TOL/CORTOL,YAXIS,-0.1000,0.1000T(CORTOL_3)=TOL/CORTOL,ZAXIS,-0.1000,0.1000OUTPUT/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)