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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
oppose of "LAST" ?
 Login/Join
 
<bigpgo>
posted
Hello all. I'm trying to separate my pdf output into 2 logical sections via UNDER-LINE keyword. For ex, I have 2 car types. I want to first print info about BWM's, then line separation, then info about Ford. I have:

DEFINE FILE CARS
mySort/A1 = IF CAR EQ 'BMW' THEN 'A' ELSE 'Z';
END

TABLE FILE CARS
PRINT
CAR VIN

BY mySort NOPRINT
ON mySort UNDER-LINE
..
END

This works well except, I get all of my BMW's, then line-break, then all the Ford's, then another line break. How can I prevent that last line-break of appearing? Is there a LOOK_AHEAD keyword (opposite of LAST), so I could do:

ON mySort UNDER-LINE WHEN (LOOK_AHEAD mySort) NE mySort
?

Of course, I cant use LAST since if last sort field is different, it's too late to try and underline...
Thanks in advance.
 
Report This Post
<JG>
posted
I think I must be missing something here.
IF mySort is defined as you show even if more values or a decode list are used
then you already know what the last sort value is.

So a simple ON mySort UNDER-LINE WHEN mySort NE 'Z'
will do exactly what you need.

If you are crating a none predetermined sort and just do not want an underline for the last sort then look at the following

TABLE FILE CAR
SUM MAX.CAR
ON TABLE SAVE
END
-RUN
-READ SAVE &LASTCAR.A16.
-RUN
TABLE FILE CAR
PRINT
CAR MODEL
BY CAR NOPRINT
ON CAR UNDER-LINE WHEN CAR NE '&LASTCAR'
ON TABLE PCHOLD FORMAT PDF
END
 
Report This Post
<bigpgo>
posted
JG, thanks for the reply. The problem with that is - it draws a line after each BWM, instead of the last one. In other words:
BMW 325
_______
BMW 330
_______
Ford 150
Ford 250

I'm trying to get:
BMW 325
BMW 330
_______
Ford 150
Ford 250

And if you take out the "WHEN" portion, ON CAR UNDER-LINE produces:
BMW 325
BMW 330
_______
Ford 150
Ford 250
________

(I was just trying to avoid the last underline)
 
Report This Post
Master
posted Hide Post
As JG said

"simple ON mySort UNDER-LINE WHEN mySort NE 'Z'
will do exactly what you need."

will work for you. Here is the sample code that gives what you want,


DEFINE FILE CARS
mySort/A1 = IF CAR EQ 'BMW' THEN 'A' ELSE 'Z';
END

TABLE FILE CARS
PRINT
CAR VIN

BY mySort NOPRINT
ON mySort UNDER-LINE WHEN mysort NE 'Z'
..
END


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
<bigpgo>
posted
You're right, "WHEN NE mysort NE 'Z'" works perfectly. I must have written it up wrong before and thought that it didnt work... Thanks all for the help.
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders