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 am a completely new on WEBFOCUS. I have a problem as below shown the code:
TABLE FILE TMPDATA3 SUM VALUE AS 'BALANCE' OVER CONNT AS 'SUMMARY BALANCE' BY PYEAR NOPRINT ACROSS PMONTH ON PYEAR SUBHEAD " ON TABLE SET ONLINE-FMT HTML END
How can I add a few spaces at the AS field (eg. VALUE AS ' BALANCE').
Can anyone help me !?This message has been edited. Last edited by: <Mabel>,
If you look at the HTML source (View > Source in IE) you will notice that the spaces are being faithfully put into your HTML source by the WebFOCUS server. Then, what gives, you may well ask.
It's your browser that's closing up additional spaces. Standard browser behavior.
The way around it is to use the entity, which tells the browser NOT to compress the spaces.
Use a DEFINE field:
DEFINE FILE xxx NBSP/A5='' '; END
Extra single quote at the start is to tell dialogue manager to ignore the ampersand and treat it as a literal.
BUT
I also sense you want to use the spaces to make something line up. Only heartache there. It will never line up if your browser is displaying standard proportional fonts.
Have a look at the section of the Creating Reports manual on "spot markers" or look into CSS formatting. There are tricks there to help you get things to line up in HTML.
But it seems cannot work and shown the error: ______________________________________________ 0 ERROR AT OR NEAR LINE 59 IN PROCEDURE test.fex (FOC295) A VALUE IS MISSING FOR: nbsp ______________________________________________
Here is another approach: DEFINE FILE CAR AMPER/A1 WITH COUNTRY = HEXBYT(38,AMPER); SEMI/A1 WITH COUNTRY = HEXBYT(59,SEMI); NBSP/A6 WITH COUNTRY = AMPER | 'nbsp' |SEMI; END
HTH
Posts: 252 | Location: USA | Registered: April 15, 2003
But it still cannot work, how can I pass the define field to the AS field ?
DEFINE FILE CAR NBSP/A6='&|nbsp;'; CHGY/A50=NBSP|NBSP|NBSP|NBSP|NBSP|NBSP|'CHANGED'; END TABLE FILE CAR SUM VALUE OVER CHGYOY AS CHGY OVER BALANCE BY PYEAR AS '' ACROSS PMONTH ON TABLE SET ONLINE-FMT HTML ON TABLE SET HTMLCSS ON END This message has been edited. Last edited by: <Mabel>,
You must divide between filling the AS text = column title (here use &variables) and the value of the field (columns, here use DEFINE):
This code works fine and does what you want:
-SET &ECHO=ALL; -RUN
-* for the AS Text = column title -SET &BLANK = '&'|'nbsp;'; -SET &BL5 = &BLANK | &BLANK | &BLANK | &BLANK | &BLANK ; -RUN
DEFINE FILE CAR -* FILL THE AMPERSAND & SIGN TO VARIABLE AMPER AMPER/A1 WITH COUNTRY = HEXBYT(38,AMPER); -* FILL THE SEMICOLON ; SIGN TO VARIABLE SEMI SEMI/A1 WITH COUNTRY = HEXBYT(59,SEMI); -* CREATE THE STRING NBSP/A6 WITH COUNTRY = AMPER | 'nbsp' |SEMI; -* create the string with two blanks and the field COUNTRY STRING/A25 = NBSP| NBSP| COUNTRY ; -* create the string with five blanks and the field COUNTRY STRING5/A60 = NBSP|NBSP|NBSP|NBSP|NBSP| COUNTRY ; END TABLE FILE CAR SUM DCOST STRING AS &BLANK|&BLANK|twoBLANKSWITHCOUNTRY STRING5 AS &BL5|FiveBLANKSWITHCOUNTRY
In my opinion... In order to give any kind of style to WebFOCUS reports or, in this case, align anything in HTML/xhtml, the best way is the use of CSS (Cascading Style Sheets).
In this case, text-indent is the property we need.
Try the following example:
-* Report. Business logic. TABLE FILE CAR PRINT MODEL AS 'Model' OVER CAR AS 'Car' OVER COUNTRY AS 'Country' OVER SALES AS 'Sales BY MODEL NOPRINT SUBFOOT " " ON TABLE HOLD FORMAT HTMTABLE ON TABLE SET STYLE * TYPE=TITLE, COLUMN=P2, CLASS=indent1, $ TYPE=TITLE, COLUMN=P3, CLASS=indent2, $ TYPE=TITLE, COLUMN=P4, CLASS=indent3, $ END -RUN
-* Output - Presentation logic. -HTMLFORM BEGIN
!IBI.FIL.HOLD; -HTMLFORM END
Regards, MikelThis message has been edited. Last edited by: <Mabel>,
Ringo, what about just a simple adjustment to your style sheet? TABLE FILE TMPDATA3 SUM VALUE AS 'BALANCE' OVER CONNT AS 'SUMMARY BALANCE' BY PYEAR NOPRINT ACROSS PMONTH ...etcetera ON TABLE SET ONLINE-FMT HTML ON TABLE SET STYLE * TYPE=TITLE,COLUMN=VALUE,JUSTIFY=RIGHT,$ ---or TYPE=TITLE,COLUMN=VALUE,JUSTIFY=CENTER,$ ENDSTYLE END
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003