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     AS field name truncated the spaces

Read-Only Read-Only Topic
Go
Search
Notify
Tools
AS field name truncated the spaces
 Login/Join
 
Gold member
posted
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>,
 
Posts: 55 | Registered: May 15, 2004Report This Post
Guru
posted Hide Post
The label can be right-justified by adding /R following the variable name.

value/R as 'Balance'

HTH.
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Master
posted Hide Post
To do exactly what you asked...

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.

Cheers.
 
Posts: 919 | Registered: March 26, 2003Report This Post
Master
posted Hide Post
Here is that code again, embedded in tags so it actually displays - the browser turned my code into spaces - as it was supposed to!

DEFINE FILE xxx<br />NBSP/A5='' ';<br />END
Cheers!
Bob
 
Posts: 919 | Registered: March 26, 2003Report This Post
Gold member
posted Hide Post
Bob,

Thank you very much for your help!

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
______________________________________________
 
Posts: 55 | Registered: May 15, 2004Report This Post
Guru
posted Hide Post
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, 2003Report This Post
Gold member
posted Hide Post
Try this one:
[qb]
DEFINE FILE xxx<br />NBSP/A5='&|nbsp;';<br />END
[/qb]
The vertical bar says Focus to not treat it as an amper variable but as a string instead !
 
Posts: 54 | Location: Switzerland | Registered: May 13, 2003Report This Post
Gold member
posted Hide Post
quote:
Originally posted by Roland:
Try this one:
DEFINE FILE xxx<br />NBSP/A6='&|nbsp;';<br />END
The vertical bar says Focus to not treat it as an amper variable but as a string instead !
I only saw now, that the field is not long enough. Make it A6, as in the reviewed code above !
 
Posts: 54 | Location: Switzerland | Registered: May 13, 2003Report This Post
Gold member
posted Hide Post
Thanks, Roland

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>,
 
Posts: 55 | Registered: May 15, 2004Report This Post
Gold member
posted Hide Post
Can anyone tell me if it cannot do like this, so I need not to keep trying? Or this is the limitation for WEBFocus ?!
Confused Confused Confused Confused Confused Confused Confused Confused
 
Posts: 55 | Registered: May 15, 2004Report This Post
<ineuxf>
posted
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

BY COU

ON TABLE SET ONLINE-FMT HTML
END

-EXIT

hope this helps

Udo
 
Report This Post
Platinum Member
posted Hide Post
This example also works fine:

-SET &NBSP = '&' | 'nbsp;' ;
-SET &TITLE1 = 'Model' ;
-SET &TITLE2 = &NBSP | 'Car' ;
-SET &TITLE3 = &NBSP | &NBSP | 'Country' ;
-SET &TITLE4 = &NBSP | &NBSP | &NBSP | 'Sales' ;

TABLE FILE CAR
PRINT
MODEL AS '&TITLE1' OVER
CAR AS '&TITLE2' OVER
COUNTRY AS '&TITLE3' OVER
SALES AS '&TITLE4'
BY MODEL NOPRINT SUBFOOT
" "
END
-RUN

Regards,
Mikel

This message has been edited. Last edited by: <Mabel>,
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Platinum Member
posted Hide Post
And another interesting approach.

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,
Mikel

This message has been edited. Last edited by: <Mabel>,
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Expert
posted Hide Post
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, 2003Report This Post
Gold member
posted Hide Post
Mikel,

Thank you very much. I am very happy that you DO help me to solve this problem. It works now.


FOR susannah,

If use the JUSTIFY can solve my problem, I needn't to post this for help. Anyway, Thanks a lot.


Best Regards,
Ringo
 
Posts: 55 | Registered: May 15, 2004Report 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     AS field name truncated the spaces

Copyright © 1996-2020 Information Builders