Available with Edition: PRO and CLOUD


You can create Excel reports directly from TCL instead of using the GUI interface.  Use the Data View Manager to create your data views then use phiReport Builder to build the reports.  Once saved, they can be run using the phiReport Query application or from TCL or from a BASIC program using the phiReport API.


From TCL, log to your data account and enter RPTRUN. 


RPTRUN {Report Name} {options} 

If no report name is provided you will be prompted to enter one.

Use the "-d" options parameter to indicate the Data Source (Data Section) to use.





If the report has criteria token(s) defined, RPTRUN will prompt you to enter them before the report is created.  The prompts can be answered through DATA statements if you are EXECUTEing from a BASIC program.



If your report definition allows for multiple data sections, you can specify the one to use with the "-d" option.

The "-d" option must appear at the end of the statement and be directly followed by the data section name.


or 



In the above 2 commands, the "-d" option instructs PRReport to use the data section "DELETED" in the query statement.  


If the "-d" option is omited, the default data section is used.  If no default data section is defined, the main data file is used.




The RPTRUN command can also be used to generate multi-sheet report.  A multi-sheet report is an Excel workbook that has more than one worksheet.  Each worksheet will contain one report.

The create multi-sheet reports with RPTRUN, enter RPTRUN at TCL and press enter.  You will be prompted for a report name or TCL statement.  After pressing enter on the first report, RPTRUN will prompt you for another report name/TCL statement.  Enter as many as required.  When done, press enter again to start generating the report.