I have a requirement to generate an Excel report using P4QFOCUS. If the input file has data, then print the data in excel sheet, If there is no record in input file,then print only message "file is empty" in excel sheet.
Eg:
input file:
01 james 25
05 john 18
If input file has records then,Excel sheet should be generated as below,
RollNo Name Age
01 james 25
05 john 18
If no records are present in input file then, excel sheet should be generated as, "file is empty"
I am expecting the logic for Focus step, if focus step is ready,then i will have a mail step to send the report to the mail id as an excel format.
Please find the code below, which i have tried.
TABLE FILE <Table name>
COUNT <Roll No> NOPRINT
IF COUNT NE 0
PRINT Roll-No AS 'Roll No'
Name AS 'NAME'
Age AS 'Age'
ELSE
IF COUNT EQ 0
PRINT
HEADING CENTER
"File is empty"