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 have a report that produces an executive summary in its heading, including the values of several fields from the report. I have a line that is supposed to look like this --
Statewide served were 83,615 and the prior week count was 84,069, decreasing by 454 customers
The problem is that it looks like this --
Statewide served were 83,615 and the prior week count was 84,069, decreasing by 454 customers
When I attempt to select the extra space with the mouse it indicates that it's not blank spaces that can be selected individually, but some strange part of the field that either gets selected as a whole or not at all. Due to the variable size of the fields involved I can't trim them very effectively.
Can anybody tell me what I'm looking at and if there is a way to mitigate the issue?
This is one big complicated summary report full of seriously critical information, packed with heavy-duty recaps, special headers and built-in comparisons to prior versions. But if I place it on the desk in front of someone the first thing they'll do is point at those blank spaces and tell me to remove them.
J.This message has been edited. Last edited by: <Kathryn Henning>,
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
One approach: 1. Create an alpha field containing the numeric value as a character string (COMPUTE NOPRINT using FPRINT or FTOA or PTOA). 2. Left-justify the string (Another COMPUTE NOPRINT, using LJUST) 3. String together your fixed and variable text, using hard catenation to remove the trailing blanks. 4. Imbed that computed field in your heading.
Or, HOLD your data, capture those three counts in &vars (TABLE, READFILE); reformat and justify as desired (as another 3 &vars) , TRUNCATE the resulting &vars, and simply reference the &vars in the heading of the final TABLE request.
The first approach avoids Dialog Manager stuff, but requires you to convert your present heading:
"some text <first_counter> more text <second_counter> etc."
Amper-variables have their own issues with commas after them, and I've managed to trim the couple I have pretty well. The COMPUTE option is not pretty, but I may have to be it. It's a shame their isn't a better way to do this.
Of course it would help if functions like LJUST could figure out the length on their own instead of forcing you to enter all of them, but I'm not expecting that to change anytime soon.
Thanks gents.
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
I prefer the DM route. You can streamline the number-formatting code by embedding the FPRINT/FTOA and LJUST dirty work in a covering DEFINE FUNCTION.
The TRUNCATE will have to be separate -- it's not valid in DEFINE or COMPUTE (for obvious reasons).
As to commas: I though commas (like blanks and must punctuation -- quotes, parens, etc.) are recognized as delimiters for &var names; if not, toss in a vertical bar.
Bonne chance.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
This works but I can't put commas in the number --
COMPUTE HEADING_LINE_7/A40V = 'week. Statewide served were ' | TRIMV('L', EDIT(TOT.ALL_SERVICES_COUNTER, '999999999'), 9, '0', 1, 'A9V') || ' test'; NOPRINT
For this field in particular it's an integer so FToA is out. If I put commas in the EDIT function's mask it turns the entire string into commas which is really weird.
Still working this.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
COMPUTE ALL_SERVICES_COUNTER_F/F8 = TOT.ALL_SERVICES_COUNTER;
COMPUTE HEADING_LINE_7/A120V = 'week. Statewide served were ' | TRIMV('L', FPRINT(ALL_SERVICES_COUNTER_F, 'I9C','A16V'), 16, ' ', 1, 'A9V') ||
' and the prior week count was ' | TRIMV('L', EDIT(FST.PRIOR_WEEK_ALL_SERVICES_COUNTER, '999999999'), 20, '0', 1, 'A9V') ||
', ' | TOTAL_INCREASING_OR_DECREASING | ' by ' | TRIMV('L', EDIT(TOTAL_SERVED_DIFFERENCE, '999999999'), 20, '0', 1, 'A9V') || ' customers'; NOPRINT
The first line converts the value to a fixed point, and then the FPRINT conversion in the actual text line finishes the job. Remarkably hard, but it works, and that's what really counts. Thank you all for tuning in, and thank you Alan for pointing me in the right direction.
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
An update -- oddly enough, converting the second variable to work the same as the first throws a pdf paneling error. Exact same concept, but the report apparently is wider now and the conversion to PDF cannot happen due to my HEADALIGN command. This even occurs if I don't print HEADING_LINE_7 in the heading.
Never a dull moment, for some reason PDF now thinks the report is wider than it is. Close, but no cigar yet.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
1. When you mix || and |, all the spaces squeezed out by a series of ||'s is inserted before the first following |.
When you use | after strings where you wish to preserve the trailing space, parenthesize the phrase as: (operand | operand). That way all the internal spaces "removed" by the series of || can float to the end.
Possibly, the length of the computed /A120V will be set to the trimmed length of the content, and PDF will be able to preserve the "original" width.
2. In any event, 120 is more than you need. I think /A111V will do it.
3. What happens if you use FPRINT (rather than EDIT()) but suppress the commas (using: 'I9', 'A9V'). Does it still break?This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005