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     Trouble with SUBHEAD

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Trouble with SUBHEAD
 Login/Join
 
<bigpgo>
posted
Hello all. I'm experiencing a really weird issue. I'm getting "no data" almost randomly in my SUBHEAD's, yet the data is there.. What I mean is:

I have a HOLD file, say, report1 - it was built after various MATCH and JOIN statements.

SET NODATA = 'nodata'

...
AFTER MATCH HOLD AS report1 OLD
END

DEFINE FILE report1 ADD
myDate/YYMD = '20060101';
END

TABLE FILE report1
PRINT
myValue AS ''
BY myVar1 NOPRINT SUBHEAD
" < myDate"
BY myDate AS ''
ACROSS myVar2 AS ''

ON TABLE SET STYLE *
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K
END

The column for myDate has 2006/01/01 for all the rows, however, only *some* SUBHEADs contain the value. It seems that it's almost random - some do, some dont. Strangely enough, if I change "ACROSS myVar2 AS ''" to "BY myVar2 AS ''", it starts printing the SUBHEADs correctly every time... Any hints? (I've tried using other fields instead of myVar2 - it wasn't specific to that fied.. same behavior with other fields)
 
Report This Post
Virtuoso
posted Hide Post
You might need a 'with' on the define.

Define mydate/ymd with fielda where fielda is in the report.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
<bigpgo>
posted
Leah - thanks for the reply. I'm a bit confused - how would I use WITH? I'm actually using '20060101' as the value, not a field in a report. In the final report, I might change "myDate/YYMD = '20060101';" to "myDate/YYMD = &DATE;"

Can you give a specific example for how I'd use WITH here?
 
Report This Post
Virtuoso
posted Hide Post
quote:
AFTER MATCH HOLD AS report1 OLD
END

DEFINE FILE report1 ADD
myDate/YYMD WITH fielda = '20060101';
END


Where fielda is a field in report1, this lets WebFOCUS know when to 'define' the field as the define is generated for every record in the report.

I hope the mud is clearer. I've been blaming everything on daylight savings time today. Smiler


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
<bigpgo>
posted
I've tried using WITH but no luck. I've simplied my code to literally be:
SET NODATA = 'nodata'
JOIN
TableA.Dept AND TableA.EmpID IN TableA
TO ALL
TableB.Dept AND TableB.EmpID IN
TableB AS J2
END

MATCH FILE TableA
PRINT Salary
BY Level
BY Track
WHERE Dept EQ 'ABC'
RUN
FILE TableC
SUM Rating
BY Level
BY Track
WHERE Dept EQ 'ABC'
AFTER MATCH HOLD AS report2 OLD-AND-NEW
END

DEFINE FILE report2 ADD
myLabel/A1 = 'A';
END

TABLE FILE report2
SUM
Salary AS ''
BY Level SUBHEAD
"For level = < Level , label is: < myLabel "
ACROSS Rating AS ''

ON TABLE SET STYLE *
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K
END

I notice that the only time I get a value for myLabel in the SUBHEAD is when, for rating # 1 (across the top) - there is a value for Salary. If say Salary is only listed for rating # 2 and forward (but for the 1st Rating across the top, a Salary value does not exist), the SUBHEAD will not print properly... I tried changing my define to what's below, but it still doesn't work.. Any ideas?

DEFINE FILE report2 ADD
myLabel/A1 WITH Rating = 'A';
END

This message has been edited. Last edited by: <bigpgo>,
 
Report This Post
<bigpgo>
posted
The output I expect is:
         | Good | Medium | OK |
          -----------------------
Level|
---------------------
For level=1, label=A
1           60K | 50K       |         |

For level=2, label=A
2                  | 55K       | 45K |

For level=3, label=A
3           68K |              | 48K |


What I actually get:
         | Good | Medium | OK |
          -----------------------
Level|
---------------------
For level=1, label=A
1           60K | 50K       |         |

For level=2, label=nodata
2                  | 55K       | 45K |

For level=3, label=A
3           68K |              | 48K |

This message has been edited. Last edited by: <bigpgo>,
 
Report This Post
Guru
posted Hide Post
If you are using a constant value (either hardcoded or contained in an &var), why don't you just use the &var in the SUBHEAD, rather than DEFINing a field?


BY Level SUBHEAD
"For level = < Level , label is: A "


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
<bigpgo>
posted
Piipster, thanks for the reply. Part of the reason why I'm using a define and getting that value into a variable is - I actually do some formatting to make it look prettier, in the define.

It seems to me that this is a bug in webFOCUS.
 
Report This Post
Virtuoso
posted Hide Post
I recently had this same problem...you are missing some values somewhere in the Match.
Table the file after the match and see if values are missing...if so revisit your match statement.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
quote:
I notice that the only time I get a value for myLabel in the SUBHEAD is when, for rating # 1 (across the top) - there is a value for Salary. If say Salary is only listed for rating # 2 and forward (but for the 1st Rating across the top, a Salary value does not exist), the SUBHEAD will not print properly... I tried changing my define to what's below, but it still doesn't work.. Any ideas?


When I read what you were experiencing I thought the above would be the case and you confirmed what I was thinking. FOCUS takes the value from the first record on a page for a HEADING or the first record for the section for a SUBHEAD to populate a field in the HEADING/SUBHEAD. Since techically the first record (ROW 1, COL 1) has a null value, the nodata appears in the SUBHEAD.

Here's how to fix the problem. I created a TABLE FILE CAR example to duplicate the issue.

If you run the following, you see the problem occur:
DEFINE FILE CAR
SUBHFIELD/A1='A';
END
TABLE FILE CAR
SUM RCOST
BY COUNTRY
ON COUNTRY SUBHEAD
"First SUBHFIELD = < SUBHFIELD"
ACROSS SEATS
END

If you run the following, it works. I added two lines of code to force FOCUS to create a value for SUBHFIELD for each record.

DEFINE FILE CAR
SUBHFIELD/A1='A';
END
TABLE FILE CAR

SUM SUBHFIELD NOPRINT
BY COUNTRY

SUM RCOST
BY COUNTRY
ON COUNTRY SUBHEAD
"First SUBHFIELD = < SUBHFIELD"
ACROSS SEATS
END

Incidentally, this problem does not exist in WebFOCUS 7.1.3 so upgrading would solve the problem as well.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 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     Trouble with SUBHEAD

Copyright © 1996-2020 Information Builders