Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How can Report Caster send no report if no data?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How can Report Caster send no report if no data?
 Login/Join
 
Platinum Member
posted
Hi,

I have a report that rarely contains data, but that is emailed daily to users. They have requested that they only want to receive the report if it contains data.

At present they receive an Excel document with just the headings present.

Any pointers would be really appreciated.

Thanks

Mark.


WebFocus 765. iSeries v5r4
 
Posts: 175 | Location: England | Registered: April 11, 2006Report This Post
Guru
posted Hide Post
Put in some code:

IF &RECORDS EQ 0 GO TO SOMELABEL
-SOMELABEL
-INCLUDE NADAMSG (a focexec with imbedded HTML saying there is no data for the day)

I'll send an example to you.


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
 
Posts: 238 | Location: Atlanta, GA/Rehovot, Israel | Registered: May 06, 2003Report This Post
Expert
posted Hide Post
Mark,

I suppose you could insert a pre-processing fex to check the number of records that the report would contain and thne exit focus if the return is zero records. I can't remember whether the pre-processing fex can abort the process, but it's worth trying to see.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Mark, Tony,

Used in conjunction with the &&KILL_RPC variable, this is exactly what the Pre-Process fex can be used for - to verify that the main report fex should run or not.

Look for KILL_RPC in the online docs.

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Thanks Francis, I knew there was something. It just needed the grey cells to work though - and they're not fully working at the moment Frowner

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
The Guinness isn't helping? Wink


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
That will be the reason then, I haven't had any since Friday 8th!
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
Mark :
As long as the final TABLE FILE step that creates the Excel-sheet is being executed, you will keep receiving an empty-sheet attached email.

If it is the only step in your fex, then try putting in another step prior to it that writes to a Hold file. If (&RECORDS = 0) on that step, then -EXIT else, execute the Excel creating step.

And Francis,
I am not sure if we have to tweak something in the way we use the pre-processing routine to NOT get an error email. The way we have it, FOCUS treats the execution of KILL_RPC as an error and sends out an email to recepients on the "NOTIFY ON ERROR" list. Of course, it is usually the programming staff here and no email is sent to the end-users. Is this something that we can supress and not be bothered with those un-necessary emails ?

Thank you,
Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
 
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Sandeep,

Read this thread, Susannah has a suggestion that might avoid the email message:

https://forums.informationbuilders.com/eve/forums/a/tpc/...171028331#5171028331

As well, the message only gets sent to the Report Caster Administrator, so it shouldn't be a real problem.

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Thanks so much for your note Francis.

Goooooooooooooooood day !!
Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
 
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Thanks for all the suggestions everyone!

I thought I would give Susannah's method a try, in the post that Francis found (thanks Francis):

https://forums.informationbuilders.com/eve/forums/a/tpc/...171028331#5171028331

easier....
Do your Fex in 2 steps.
1) create the exact hold file from which the report would be created.
2) test the &LINES variable for value
if &LINES EQ 0 GOTO ENDOFJOB;
3) table file hold
write your nice report

This is easy and works like a charm. I do it 8zillion times a day. If there is no data, the fex bypasses the nice fancy html report generator; If there is no html output, the RC log will show NO REPORT TO DISTRIBUTE and nothing goes to anybody.
ok ok...it was 3 steps.


This works fine, apart from now myself and another developer get a failure message, as we are the Report Caster Administrators. The only options for the receipt of email are NEVER/ALWAYS/ON ERROR and I guess this is treated as 'ON ERROR'?

It would be great if I could find a way to turn the error flag off in this case, as we would still want to receive notification if the report has genuinely failed, but not if it is just empty!

Thanks

Mark


WebFocus 765. iSeries v5r4
 
Posts: 175 | Location: England | Registered: April 11, 2006Report This Post
Guru
posted Hide Post
This sounds like an opportunity to use an alert. Check out the manuals for that.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How can Report Caster send no report if no data?

Copyright © 1996-2020 Information Builders