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.
I've actually been doing this for a while now and it's great. Basically you need to use the -IF statement in the HEADER.
For example, if you want a certain field to show up if it exists then you would do this:
HEADING -IF NOT COLUMN1 IS MISSING THEN SHOWCOL1 ELSE IF NOT COLUMN2 IS MISSING THEN SHOWCOL2; -SHOWCOL1 put your column1 header text here, with quotes of course! -SHOWCOL2 put your column2 text here
The thing about the -IF statement is that it works almost like a conditional GOTO statement (as far as I've seen). Basically you are specifying the conditions to when you want the program to jump to the next scenario. I use this technique when I want to let users be able to leave a parameter blank and have the program jump out of a selection statement and go directly to showing everything in the report. You can use this in the selection area (the WHERE's) in the report as well.
You do need to play around with it to make sure your criteria is caught correctly. I know that using the condition " NE '' " (not equal to blank) makes random results appear, so just be prepared to run the report several times. Searching for the "IS MISSING" sounds like what you want to do there, though. Hope this helps!
BTW, the semicolon at the end of the -IF statement is usually required, but put it there anyway incase WebFOCUS has a fit about it, the error will say something like "missing or incomplete argument" on that line.
I'd really like to see a working example of what you've described here. I can't see how you can use Dialogue Manager to determine if a column exists in a Master with the "-IF NOT COLUMN1 IS MISSING" statement, if, indeed, that is what it's doing.
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
Well, I don't believe the column definition itself can be "checked" to exist, but the column value is what I meant.
A column has to exist in order to reference it (as far as I am aware of). In that manner, Francis, I do agree that a column cannot be checked to exist in a master.
Please make sure that the columns exist, the example above would only work if column1 (let's say CARORDERS) were not null or if column2 (let's call this one TRUCKORDERS) were not null.
Mark1, were you trying to find out if the field existed in a table or the value in the field?
Thanks!
PS. A little more clarification.
Whether a column "exists" in the meaning of the definition would be like this:
CONTENTS OF TABLE A:
CAR MAKE MODEL YEAR
If we wanted to see if a column called DEALER existed in TABLE A then it would not be doable since the field definition does not exist in TABLE A's master, or table description. You can't reference it.
If we wanted to see if the column YEAR were missing information (as in no values whatsoever) then the example above would work as far as checking the values.This message has been edited. Last edited by: gregson06,
The IS MISSING or using -IF in a header? I tried creating a temp table with the CAR minitable in order to produce null values but to no avail (it seems I can only do SQL EQUIJOINS).
What you want is first test if all the records of a certain field have a null value and in that case you want to suppress that field. I think this issue is brought up before here and as far as I remember you have to go to several tests and hold files before you can build the end report.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
Instead of a hold file create a save file and perform a -read to see if the value exists and setting and &var for your heading then use the &var in your heading.
WF 7.7.05 HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files HTML, Excel, PDF