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     No Data Message in PDF

Read-Only Read-Only Topic
Go
Search
Notify
Tools
No Data Message in PDF
 Login/Join
 
<GGOFAnalyst>
posted
I have a drilldown that sometimes shows 0 for the amount so when the user drilldowns there obviously won't be any data. I want to show a message that says "No Data Found" when the user clicks on the drilldown. However, my format is PDF, can that be done in PDF?

Also, do I need to create a new fex or can I do all that in my report that shows what's in the drilldown?
 
Report This Post
Virtuoso
posted Hide Post
Do a search on this forum and there are many examples of No Data Found fexes. Yes it can be done in PDF. You will have to add the No Data Found at the end of the drill down fex.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
<GGOFAnalyst>
posted
I searched for how to do it and I came up with this:

-IF &LINES = 0 THEN GOTO NOREPORT ELSE GOTO PRINTOUT;

-NOREPORT
DEFINE FILE CAR
NORPT/A15 = 'NO DATA FOUND';
END

TABLE FILE CAR
PRINT
NORPT AS ''
COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1

-GOTO HSTYLE

-PRINTOUT

But this doesn't seem to work on PDF.
 
Report This Post
Gold member
posted Hide Post
Use Following Code after -NOREPORT page
-NOREPORT
TABLE FILE CAR
SUM
CAR NOPRINT
HEADING CENTER
""<25>No Data to Display &DATE"
"<25>Date: <+0>&DATE<+0>; Time:<+0> &TOD<+0>"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
END
-EXIT




Env Prod:WebFOCUS 7702 ,Windows xp on 64, SQL Server 2008, IRF Tool
Env 1 Local: DevStudio 7702 - MS Windows XP SP2 - Apache Tomcat 5.0.28
Output: HTML, Excel and PDF
 
Posts: 52 | Location: NJ,USA | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
It makes no difference what format of output you've selected for the report. The Dialogue Manager IF statement is executed regardless of format.

-IF &LINES EQ 0 THEN GOTO NOREPORT ELSE GOTO PRINTOUT;

-NOREPORT
-*-- Display empty report message

JOIN CLEAR *
TABLE FILE EXPENSEBASE
PRINT EXPENSEDATE NOPRINT
IF RECORDLIMIT EQ 1
IF READLIMIT EQ 1

ON TABLE SUBHEAD
" "
"-----------------------------------------------------------------------------"
"No Data was found for the selected parameters"
"-----------------------------------------------------------------------------"
" "
" "
ON TABLE HOLD AS HOLDREP1 FORMAT HTMTABLE

ON TABLE SET STYLE *
...
ENDSTYLE
END
-RUN
-EXIT

PRINTOUT
...


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
<GGOFAnalyst>
posted
Francis, I tried that as well in my drilldown report, pretty much exactly what you had. But that doesn't work either.
What is see when I run the report is a PDF file that looks like this:

0

F FYTD Actual
Category
____________________________________
 
Report This Post
Expert
posted Hide Post
OK, this is most likely because you have SET EMPTYREPORT=ON.

If there is a HOLD file creation prior to the report,do the &LINES test just after the HOLD file creation, or do not code SET EMPTYREPORT=ON.


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
<GGOFAnalyst>
posted
I have the &Line after the HOLD file so I don't think that's the problem.
If I don't code the set emptyreport = on then I just get the No HTML Output screen.
 
Report This Post
Expert
posted Hide Post
When you use -IF or -SET &.. this is Dialogue Manager. If you have WebFOCUS code (DEFINE, JOIN, TABLE, etc) between the Dialogue Manager code, unless you add a -RUN right after the END statement, the WebFOCUS code will NOT execute until all the Dialogue Manager code executes, so I always make sure I add a -RUN after each END statement and after a set of JOIN statements...


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
<GGOFAnalyst>
posted
Yea I learnt that in the intermediate WebFocus course that I took. So I hate to say it but I have -RUN after every JOIN and every END statement.
 
Report This Post
Expert
posted Hide Post
Could it be the invalid syntax of the -IF statement:

-IF &LINES = 0

should be

-IF &LINES EQ 0


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
Guru
posted Hide Post
Try this:

Create fex 1 as follows:

-* File testdrilldown.fex
TABLE FILE CAR
SUM
     BODYTYPE
     SALES
BY COUNTRY
BY CAR
BY MODEL
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=DATA,
     COLUMN=N4,
     FOCEXEC=testdrilldown2.fex(CNTRY=N1 CR=N2 BDYTYP=N4),
$
TYPE=DATA,
     COLUMN=N4,
     TARGET='_blank',
$
ENDSTYLE
END
-RUN


Then create drilldown fex (named testdrilldown2.fex) as follows:
-* File testdrilldown2.fex
-DEFAULT &CR='JAGUAR'
-DEFAULT &CNTRY='ENGLAND'
-DEFAULT &BDYTYP='CONVERTIBLE'
TABLE FILE CAR
SUM  COMPUTE DEALER_NET/D7=SALES - DEALER_COST;
BY COUNTRY
BY CAR
BY BODYTYPE
HEADING
""
FOOTING
""
WHERE COUNTRY EQ '&CNTRY';
WHERE CAR EQ '&CR';
WHERE BODYTYPE EQ '&BDYTYP';
WHERE SALES GT 0;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
ENDSTYLE
END
-IF &RECORDS NE 0 THEN GOTO ENDFEX;
TABLE FILE CAR
SUM
CAR NOPRINT
HEADING CENTER
"<25>No Data to Display &DATE"
"<25>Date: <+0>&DATE<+0>; Time:<+0> &TOD<+0>"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
ENDSTYLE
END
-ENDFEX
-EXIT


Run the first fex and click on any sales with value greater than 0 and it will report on it. If you click on the 0 sales you should get the No Data message on PDF.

Is this what you need?


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
<JG>
posted
Silly question, but why do you not make it a conditional drilldown?
That way there is never going to an issue.

TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,
TARGET='_blank',
FOCEXEC=carinst(COUNTRY=N1),WHEN= DEALER_COST GT 10000,
$
ENDSTYLE
END
 
Report This Post
<GGOFAnalyst>
posted
I fixed the problem. The problem wasn't the format or how I was calling the &Line. The problem was that I wasn't using a where statement to specify my region.
Thanks everyone.
 
Report 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     No Data Message in PDF

Copyright © 1996-2020 Information Builders