Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Empty report ON
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Empty report ON
 Login/Join
 
Member
posted
Hi Team - New year greetings to all

I was checking on empty report and with SET EMPTYREPORT = ON i am not receiving blank report for report format COMT, where as it is working for EXL2K

EMPTYREPORT = ON doesn't work for COMT ?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 7.7
Unix
All Formats : Excel,PDF,HTML,Dlimiter,.txt
 
Posts: 9 | Registered: May 30, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Basically, COMT is not a "report" but a data file output format. So, no it's not working as you thing it will.

Regarding Excel output format, as per : Controlling Output When a TABLE Request Retrieves Zero Records you have an empty Excel file because EMPTYREPORT is not supported for this action

But using the below, I do have an empty (0 bytes) csv file generated
TABLE FILE CAR
PRINT SEATS
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'CANADA';
ON TABLE HOLD AS baseapp/TEST FORMAT COMT
END
-RUN


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2393 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
Use a pre-process to check to see if you have data that will/will not be held as COMT and branch accordingly.
-SET &ECHO = ALL ;
TABLE FILE CAR
PRINT SEATS
WHERE RECORDLIMIT EQ 1;
-*WHERE COUNTRY NE COUNTRY ;
ON TABLE HOLD 
END
-RUN
-IF &RECORDS EQ 0 THEN GOTO :NoDataToHold ELSE GOTO :HoldThis ;
-:HoldThis
TABLE FILE CAR
PRINT SEATS
BY COUNTRY
BY CAR
ON TABLE PCHOLD AS baseapp/TEST FORMAT COMT
END
-RUN
-GOTO :TheEnd

-:NoDataToHold
SET EMPTYREPORT = ON
SET PAGE = NOPAGE
TABLE FILE CAR
HEADING
"NO DATA FOR THIS REPORT"
PRINT SEATS NOPRINT
WHERE COUNTRY NE COUNTRY ;
ON TABLE PCHOLD FORMAT HTML
END
-RUN
-GOTO :TheEnd

-:TheEnd
-SET &ECHO = OFF ;
-TYPE *** The End ***
-EXIT




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3124 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Member
posted Hide Post
Thank you Martin and Doug for the reply!

I tried both the way and i don't see empty report getting generated.

In schedule if i select EXL2k as report format and run i receive empty report but when i select COMT and run the schedule,log is showing "no report to distribute"


WebFOCUS 7.7
Unix
All Formats : Excel,PDF,HTML,Dlimiter,.txt
 
Posts: 9 | Registered: May 30, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
As I stated, COMT is NOT a report format, it's a file format and RC expect to produce a report, not a file. Its name tell it "REPORT Caster".
We can generate file with RC but at the end, if you are not "giving" him a report it will send you that warning.
Try the following code and setting

1- Create a fex with the below and add it in a schedule
TABLE FILE CAR
PRINT SEATS
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'CANADA';
ON TABLE HOLD AS baseapp/TEST FORMAT COMT
END
-RUN

-* --------------------------------------------------
-* THIS STEP IS ONLY TO AVOID THE RC WARNING FROM NO REPORT TO DISTRIBUTE
-* --------------------------------------------------
TABLE FILE CAR
BY COUNTRY NOPRINT
HEADING
" END OF : GENERATES COMT TEST FILE"
WHERE READLIMIT   EQ 1;
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
END
-RUN

2- In your schedule in the Distributions tab add a "Report Library" as the distribution method
3- Run the schedule

It will result in TEST.csv empty file generated under baseapp and you RC log file will not have the "No report to distribute"


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2393 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Empty report ON

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.