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     set emptyreport = on not working for me :(

Read-Only Read-Only Topic
Go
Search
Notify
Tools
set emptyreport = on not working for me :(
 Login/Join
 
Platinum Member
posted
hi friends ,

Is it just me or what Frowner but set empty report = on is not working for me..In our report, we have listboxes as filters and when the user selects particular values in the listbox , he must see a user - friendly message saying that there is no data and a blank column titles indicating an empty report .



(When i use set emptyreport= ANSI , i am able to see an emoty report with footer..and not the user-friendly message. )


I am able to see only the user-friendly message but not the blank titles.
below is my code for user friendly message

  

-RUN
-IF &FOCERRNUM NE 0 GOTO FOC_ERR;
-IF &LINES EQ 0 GOTO NO_DATA;
-GOTO FINITO
-NO_DATA
-HTMLFORM BEGIN



<center><FONT COLOR="#0000ff">There is no data available for the selected values BPO(&BP) ,BUSINESS-CAPABILITY(&BUS) ,TEAM(&TE) in the filter.Please click Edit Layout Button to modify the Filter values.</FONT></center>
-HTMLFORM END
-EXIT
-FOC_ERR
-HTMLFORM BEGIN


<center><FONT COLOR="#0000ff">WEBFOCUS Error - Report could not be plotted </FONT></center>
-HTMLFORM END
-EXIT
-FINITO
  


The confusing part is set emptyreport = on works only for few reports but not all the reports for me..

Am i missing something?? Please advice ..
Thank you very much

This message has been edited. Last edited by: arvind,


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Virtuoso
posted Hide Post
Arvind,

If you have EMPTYREPORT=OFF, you see the message. If you have EMPTYREPORT=ON or ANSI, you won't see a message but you will see the titles. It is either/or.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Arvind,
put CODE tags around your code on this forum.
we can't see your code..only its result.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
so sorry abt that susannah , i have edited it ..hope it s fine now.,

Thanks for your reply danny,

But wait , i swear that in one of my reports i saw both the user-friendly message and blank column title.

Anyway what you said is right danny , i guess one of them will get displayed.

Thank you very much.


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Virtuoso
posted Hide Post
Arvind,
If you do want to have both the titles and the friendly message, you can enter the titles in your HTML message or do the following:
  
-* File arvind4.fex
SET EMPTYREPORT = OFF
TABLE FILE CAR
HEADING CENTER
"Sales Report"
SUM SALES RCOST DCOST
BY COUNTRY
BY CAR
IF SALES GT 2000000
END
-RUN
-IF &LINES GT 0 GOTO #GOOD_DATA;
SET EMPTYREPORT = ON, PAGE=OFF
TABLE FILE CAR
HEADING CENTER
"Sales Report"
SUM SALES RCOST DCOST
BY COUNTRY
BY CAR
IF SALES GT 2000000
IF READLIMIT EQ 1
ON TABLE PAGE-BREAK AND SUBHEAD
"There is no data available for the selected values "
END
-RUN

-#GOOD_DATA


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
DANNY,

You are a messenger of god Smiler and you are here on earth to save us poor souls..

Thank you very much


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

I know that Danny has supplied you with a solution, but do you understand why your columns were not being displayed?

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
Platinum Member
posted Hide Post
hi tony,

I saw both the user- friendly message and the empty column title at first in two reports out of 11 reports. I was confused so i raised a question in a forum.

But , now i anlaysed it . The reason why the column title do not show is because -RUN command at the end of the code runs the program so that variable &LINES has a value and it is used in a IF Condition.
So , the code which is written for user-friendly message is executed first and is diplayed first.

So , the set emptyrepot=on does not show empty column titles when we user-friendly message is to be displayed.

Please correct me if i am wrong.

Thank you sir


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

I thought that was the case, i.e your not fully understanding why. I do not ask to pour scorn on you, but attempt to help you better understand and be confident at using it Smiler

The reason you were not getting what you wanted (and why the suggestion from Danny works) is that you were effectively bypassing the empty report by specifying your own alternative HTML output.

Basically, for the emptyreport setting to work you need to let your report end within a report. Do not try and continue it onwards as you did otherwise you are controlling it and bypassing the functionality.

Take the code -

SET EMPTYREPORT = OFF
TABLE FILE CAR
SUM RCOST DOCST
BY COUNTRY
WHERE COUNTRY = 'GREENLAND'
END

Now we know that in the sample database CAR there are no data items where the Country equals Greenland, so we anticipate an empty report. In the above code we would receive an HTML page stating No HTML Output! and the normal NUMBER OF RECORDS = 0 etc. message.

If you change the SET EMPTYREPORT to ON then you will get a truly empty report with your column titles.

However, you wouldn't get your friendly message, so Danny has suggested continuing the report, when there are no lines output, to perform a short report with the same request but with IF READLIMIT EQ 1 to reduce the number of lines read from the datasource, so that he can implant a meaningful meesage to the end user by means of a subheading. You could just as easily use a heading of footing or anything really, the main fact is that you are ending in a report.

Hopefully that will help you understand more fully?

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
Virtuoso
posted Hide Post
Tony,
Right on: You really are didactic!


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
i think there's a vaccine for that, now.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
If that's the case then I'd better go to rehab - move over Whitney Wink

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
Platinum Member
posted Hide Post
Thanks a lot TONY and Daniel ,

This forum rocks , we get to learn new things everyday.


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Virtuoso
posted Hide Post
The following example will give both a customized page with the column titles when there is nothing to show, and a normal non-customized page when there is.
TABLE FILE CAR
PRINT SEG.SEATS
IF SEATS GT 10
ON TABLE SET EMPTYREPORT NO
ON TABLE HOLD FORMAT HTMTABLE
END
-IF &RECORDS EQ 0 THEN GOTO EFORM;
-HTMLFORM BEGIN
!IBI.FIL.HOLD;
-HTMLFORM END
-EXIT
-EFORM
-HTMLFORM BEGIN
NO RECORDS FOUND....<BR><BR>
RESULT OF REQUEST IS:<BR><BR>
!IBI.FIL.HOLD;
-HTMLFORM END

This will also work when EMPTYREPORT is set to ANSI (because the test is done for &RECORDS in stead of &LINES).
If you use ON, then &LINES and &RECORDS will both be zero, when ANSI is used &LINES will be 1 and &RECORDS will still be 0.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
HI Gamp,

Thanks a lot for that vital piece of information..

Hmm i am facing a small issue here. In one case, there are 4 listboxes in the report and there is "ALL" included at the top of the listboxes.

Whenever user selects values in the 3 listboxes which does not return any value and the 4th listbox points to ALL . i am not able to see the user-friendly message. i am seeing only the empty report.

I am sure it is because of the FOC_NONE variable. When i removed "ALL" from the listboxes the user-friendly message was gettin displayed.

Is there any way to display the message even when "ALL" is selected in one of the listboxes??

Hope i am able to explain
Thanks a lot


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

You need to set &ECHO=ALL; in your code, make sure your output is HTML and then look at the source of the resultant HTML file. You should see your code expanded and from that you should be able to determine the reason.

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
Platinum Member
posted Hide Post
hi tony ,

I am using SET WEBVIEWR = ON, so i am nt able to see the source code. But , i am sure that when i select ALL in one of the listboxes . the user friendly message is not getting displayed.

I have done one more thing , i split the user-friendly message into multiple lines . For example -

Line 1 - There is no data available for the selected Values LEVEL 1 Business Capability(&BPTW) ,LEVEL 2 Business Capability(&BPTH),

Line 2 - Development Owners(&DO) in the filter

So , when the user selects ALL in Development Owners Listbox and some other values in first two listboxes.

Only Line 1 is displayed as a user-frienldy message not Line 2 Because Of FOC_NONE.


One more thing , i have used SET EMPTYREPORT = ANSI and i am displaying the message in the footing of the blank report.

and i have tried replacinf FOC_NONE with the value '$*' as the listbox columns are Alphanumeric , but i am not able to see the filtered data properly here.


Is there any way to display the message even when ALL is selected ??

Thank you very much .


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

Trace the process trhough and understand how it hangs together. If you can't help yourself a little then what chance does anyone else have of helping you? 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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     set emptyreport = on not working for me :(

Copyright © 1996-2020 Information Builders