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 been searching the docs and formums for information on how to indent a line on my report. I want to indent the store code and the rest of the line items. All I find relates either to hierarchy relationships and FML. Is there not a simple way to do this.
Here is the code:
TABLE FILE CENTORD PRINT STORE_CODE PLANT MONTH BY REGION NOPRINT BY STATE BY STORENAME
ON REGION SUBHEAD "<REGION " HEADING "Sales By Plant" WHERE PLANT EQ 'BOS' OR 'DAL' OR 'LA'; ON TABLE NOTOTAL
How can I specify the indentation? Thanks in advance.
Thanks for your reply. I want my output to be: Region <indent of 5 spaces> State StoreCode Plant
I added the "IN 20" as follows but it did not work. In fact it would not even save the text I added. I don't get an error message it just that the text is gone after I press save. Would you know why it won't let me do that?
TABLE FILE CENTORD PRINT STORE_CODE IN 20 PLANT MONTH BY REGION NOPRINT BY STATE BY STORENAME
ON REGION SUBHEAD "<REGION " HEADING "Sales By Plant" WHERE PLANT EQ 'BOS' OR 'DAL' OR 'LA';
What is your version number of WebFOCUS I'm assuming here. In 4.3.6 I know if you did some thing like a copy/ paste and the line went past the 80 mark it disappeared. However, in your case, I'm not sure.
We are at 5.3.4 on Win2k or 7.1 on LINUX, so could check. I also still have some access to our old 4.3.6.
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Well let's look for the not so obvious, did you perhaps use the tab key. We've had some very strange things happen when a tab was in the code rather than spaces.
Sometimes it is the JAVA version. I had this nice chat with an Information Builders person on the JAVA issues and versions of desktop versus application server.
At the moment I'm doing it all in MRE haven't used the new Developer Studio. Are you using the MRE interface?
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
DEFINE FILE CENTORD INDENT/A60 = '&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;'; END TABLE FILE CENTORD PRINT STORE_CODE IN 20 PLANT MONTH BY INDENT AS '' BY REGION NOPRINT BY STATE BY STORENAME ON REGION SUBHEAD "<REGION " HEADING "Sales By Plant" WHERE PLANT EQ 'BOS' OR 'DAL' OR 'LA'; END
It basically defines a new field and fills it with ten "non blank spaces" which effectively indents your row by that amount.
Good luck
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Hopefully you have received my reply and as promised I have a version that will function with PDF format output.
-DEFAULT &Format='PDF'; -* Set a variable to a HTML or normal space -SET &Spc = IF &Format EQ 'HTML' THEN '&|nbsp;' ELSE ' '; DEFINE FILE CENTORD INDENT/A60 = '&Spc&Spc&Spc&Spc&Spc&Spc&Spc&Spc&Spc&Spc'; END TABLE FILE CENTORD PRINT STORE_CODE IN 20 PLANT MONTH BY INDENT AS '' BY REGION NOPRINT BY STATE BY STORENAME ON REGION SUBHEAD "<REGION " HEADING "Sales By Plant" WHERE PLANT EQ 'BOS' OR 'DAL' OR 'LA'; ON TABLE SET ONLINE-FMT &Format END
From memory I'm afraid as I am now at home, so you will have to double check that it works!
Regards
Tony
Apologies, only just now had a little time to double check what I put above .
So scratch that, it works much better with positioning as Leah suggested, but you need to add it to all the columns as follows -
-DEFAULT &Format='PDF'; TABLE FILE CENTORD PRINT STORE_CODE IN +2 PLANT IN +2 MONTH IN +2 BY REGION NOPRINT BY STATE IN 10 BY STORENAME IN +2 ON REGION SUBHEAD "<REGION " HEADING "Sales By Plant" WHERE PLANT EQ 'BOS' OR 'DAL' OR 'LA'; ON TABLE SET ONLINE-FMT &Format END
Hope this helps
Tony
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thanks for your help and your mail Tony, will keep it in mind. The indentation does not seem to work with subtotal rows. Does anyone know of a way that I can indent the text of a subtotal, have about 10 spaces before it: ' subtotal'
The trouble(?) with HTML is that white space is squeezed into minimal space and that is where the &|nbsp; comes into play. The &|nbsp; forces a space to be respected in HTML and therefore a string of them will 'force' a leading area prior to your text etc.
In PDF the spaces are preserved and therefore should always be present.
Use a combination of the variable &spc above being set to '&|nbsb;' or ' ' depending upon the output format being used.
Edited to 'escape' the ampersands
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
The following code given by you does not work with Excel format. Any idea why?
-* Set a variable to a HTML or normal space -SET &Spc = IF &Format EQ 'HTML' THEN '&|nbsp;' ELSE ' '; DEFINE FILE TEST INDENT/A60 = '&Spc&Spc&Spc&Spc&Spc&Spc&Spc&Spc&Spc&Spc'; END;
Mairead, I don't know if your indentation problem has been solved, but here is a solution that works both in HTML and in PDF:
-SET &ECHO=ALL;
-DEFAULT &OUTPUT=HTML;
-SET &HTMLSP='&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;';
-SET &PDFSP='. ';
-SET &SP=IF &OUTPUT EQ HTML THEN &HTMLSP ELSE &PDFSP;
-SET &P=IF &OUTPUT EQ HTML THEN '' ELSE '.';
-SET &INDENT=IF &OUTPUT EQ HTML THEN 'INDENT/A35 = ''&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;'';' ELSE
- 'INDENT/A5 = '' ''';
DEFINE FILE CAR
&INDENT
END
TABLE FILE CAR
SUM SALES RCOST DCOST
BY COUNTRY NOPRINT SUBTOTAL AS '&P|Total Country'
BY INDENT AS ''
BY CAR SUBTOTAL AS '&SP Total Car'
BY BODYTYPE
ON COUNTRY SUBHEAD
"<COUNTRY "
ON TABLE COLUMN-TOTAL AS '&P|Grand Total'
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT &OUTPUT
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, FONT=COURIER NEW, SIZE=10, $
ENDSTYLE
END
You will see that the report is indented and the subtotals also. For PDF, in WF7.1.3, it is necessary to have a period (or any other character) as first character otherwise WF will squeeze out the beginning spaces!
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, 2006
The issue here is that Excel is reducing the spacing, not WF. If you HOLD the EXL2K file and then look at it, you will see that the spacing is there in the XML. The question becomes how do you force Excel to preserve the whitespace given to it, and that is a whole new ball game.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
DEFINE FILE CAR
COUNTRY_CAR/A100 = COUNTRY | '..........' | CAR;
new_COUNTRY_CAR/A100 = CTRAN(100,COUNTRY_CAR,46,13,'A100');
END
TABLE FILE CAR
PRINT
COUNTRY
CAR
new_COUNTRY_CAR
ON TABLE PCHOLD FORMAT EXL2K
END
Late explanation: WF treats the ascii 10 as a nbsp now, rather than passing just a space across to the XML.This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Slight warning: there is an issue with the spacing in EXL2K format using the method I gave, and Gregv uses, to convert the required spaces to an ascii 10, which WF converts to a nbsp;
WF breaks the PCHOLD FORMAT EXL2K into an LRECL of 512. Any nbsp; that span the line break at 512 will not be read correctly and will show up in the Excel text.
Anyone know how to increase the LRECL that WF puts into the PCHOLD FORMAT EXL2K?This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007