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     [CLOSED] How can I justify an item in a HEADING?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How can I justify an item in a HEADING?
 Login/Join
 
Gold member
posted
Hi,

I want to display exchange rate on my report but I have a little problem that I can't solve. I would like to display my result as this:

1 GBP = 1,255680 EUR
1 GBP = 202,418028 JPY
1 GBP = 1,952147 USD

But my result is like this:

1 GBP = 1,255680 EUR
1 GBP = 202,418028 JPY
1 GBP = 1,952147 USD

How can I justify the exchange rate on the right? Note that the values become from -READ command.

Thanks,

Jérémy.

  
HEADING
""
""
" &&PAGENUM.EVAL <TABPAGENO"
""
""
""
""
""
""
""

-SET &K = 1;

-REPEAT LECTDESIGN FOR &K TO &I STEP 1

-SET &NINDICE = TRUNCATE(&TAUXCHANGE&K.EVAL);

"&BASEDEVREF  &MONISOPF   =   &NINDICE.EVAL <+0>&VAR&K.EVAL"

-LECTDESIGN

ON TABLE PCHOLD FORMAT PDF

ON TABLE SET PAGE NOLEAD

ON TABLE SET STYLE *

-INCLUDE opp_sty_rep

-INCLUDE opp_sty_heading

TYPE=HEADING, COLOR=BLACK, $
TYPE=HEADING, LINE = 11, POSITION=5, BACKCOLOR=&&C_lig02, $
TYPE=HEADING, LINE = 11, ITEM=2, POSITION=8.7, $
TYPE=HEADING, LINE = 12, POSITION=5, BACKCOLOR=&&C_lig01, $
TYPE=HEADING, LINE = 12, ITEM=2, POSITION=8.7, $
TYPE=HEADING, LINE = 13, POSITION=5, BACKCOLOR=&&C_lig02, $
TYPE=HEADING, LINE = 13, ITEM=2, POSITION=8.7, $
TYPE=HEADING, LINE = 14, POSITION=5, BACKCOLOR=&&C_lig01, $

ENDSTYLE

END

This message has been edited. Last edited by: Kerry,
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Virtuoso
posted Hide Post
JUSTIFY=RIGHT,


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Gold member
posted Hide Post
I tried but it doesn't work.
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Virtuoso
posted Hide Post
Oh...
Take a look at This May give you some insight..Look for Mickey's article


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
It would be helpful to post a working example:

-SET &ECHO=ALL;

-SET &BASEDEVREF = 1;
-SET &MONISOPF   = 'GBP';

-SET &I = 3;

-SET &TAUXCHANGE1 = '1,255680'  ;
-SET &TAUXCHANGE2 = '202,418028';
-SET &TAUXCHANGE3 = '1,952147'  ;

-SET &VAR1 = 'EUR';
-SET &VAR2 = 'JPY';
-SET &VAR3 = 'USD';

TABLE FILE CAR
SUM SALES
BY COUNTRY

HEADING
"SALES REPORT"
" "

-SET &K = 1;

-REPEAT LECTDESIGN FOR &K TO &I STEP 1

-SET &NINDICE = TRUNCATE(&TAUXCHANGE&K.EVAL);

"&BASEDEVREF  &MONISOPF =   <+0>&NINDICE.EVAL <+0> <+0>&VAR&K.EVAL"

-LECTDESIGN

ON TABLE SET STYLE *
TYPE=HEADING, COLOR=NAVY, HEADALIGN=INTERNAL, $
TYPE=HEADING, LINE=3, ITEM=2, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=4, ITEM=2, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=5, ITEM=2, JUSTIFY=RIGHT, $
END
-RUN


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Thanks Francis, your code produces this result:



So there isn't right justification, values are left-justified.

Any idea?
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Member
posted Hide Post
I added the width command to right justify the values if needed.

"&BASEDEVREF <+0>&MONISOPF<+0> = <+0>&NINDICE.EVAL<+0> <+0>&VAR&K.EVAL"
-LECTDESIGN
" "
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING, COLOR=NAVY, HEADALIGN=BODY, $
TYPE=HEADING, LINE=3, ITEM=4, OBJECT=TEXT, WIDTH=1.00, COLOR=RED, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=4, ITEM=4, OBJECT=TEXT, WIDTH=1.00, COLOR=RED, JUSTIFY=RIGHT, $
TYPE=HEADING, LINE=5, ITEM=4, OBJECT=TEXT, WIDTH=1.00, COLOR=RED, JUSTIFY=RIGHT, $
END


7.7.03
 
Posts: 5 | Location: Somewhere near the Crab Nebula | Registered: September 05, 2007Report This Post
Gold member
posted Hide Post
Hi Tom and Les, and thanks.

But the result is not the result I expect :

Tom Flynn



Les



In these 2 cases, th eexchange rate is justified on the left althought it is specified "JUSTIFY=RIGHT".

Amazing...
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Gold member
posted Hide Post
OK sorry Tom I didn't see that the item concerned was the 4th and not the second.

The solution proposed by Les give me the result I expected. The problem is solved.

Many Thanks!

This message has been edited. Last edited by: Jérény Deidda,
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Virtuoso
posted Hide Post
Jérény,

Did you read the article I wrote as Prarie suggested? You can find it at the following URL. It explains a lot about positioning HEADING text which is what you are doing.

http://www.informationbuilders.com/support/developers/htmlpdf_part2.html


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Gold member
posted Hide Post
Ok thanks Mickey!


WebFOCUS 7.6.4 running on Windows
Output formats : PDF, Excel and HTML
My blog
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Virtuoso
posted Hide Post
Jérény,

I see that you wanted a PDF output. You want the values of the exchange rates to be right-justified and the names of the currencies left-justified.

In DS you can use in the HEADING the Alignment Grid (right-click in the Heading box) and put your text in the boxes that will be formed. You can then adjust them by dragging. The code will look like this:
  
TABLE FILE CAR
SUM 
     SALES
BY COUNTRY
BY CAR
HEADING
"1 GBP =<+0>1,255680 <+0>  EUR"
"1 GBP =<+0>202,418028 <+0>  JPY"
"1 GBP =<+0>1,952147 <+0>  USD"
" "
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.667,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=2,
     JUSTIFY=RIGHT,
     WIDTH=.931,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=.500,
$
TYPE=HEADING,
     LINE=2,
     OBJECT=TEXT,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.667,
$
TYPE=HEADING,
     LINE=2,
     OBJECT=TEXT,
     ITEM=2,
     JUSTIFY=RIGHT,
     WIDTH=.931,
$
TYPE=HEADING,
     LINE=2,
     OBJECT=TEXT,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=.500,
$
TYPE=HEADING,
     LINE=3,
     OBJECT=TEXT,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.667,
$
TYPE=HEADING,
     LINE=3,
     OBJECT=TEXT,
     ITEM=2,
     JUSTIFY=RIGHT,
     WIDTH=.931,
$
TYPE=HEADING,
     LINE=3,
     OBJECT=TEXT,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=.500,
$
TYPE=HEADING,
     LINE=4,
     OBJECT=TEXT,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.167,
$
ENDSTYLE
END

Notice the spot markers (<+0>) in the HEADING and the WIDTH attribute in the style sheet.


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, 2006Report This Post
Virtuoso
posted Hide Post
If you use

"JUSTIFY=DECIMAL(.6)"

You can control the alignment even better when the field holds an number value that needs to be aligned on the point or comma.

See the manual wf761crlang.pdf page 1315.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post

Just FYI, you can use this:
"</2> &&PAGENUM.EVAL <TABPAGENO </7>"
instead of the following:
quote:
HEADING
""
""
" &&PAGENUM.EVAL <TABPAGENO"
""
""
""
""
""
""
""


This provides cleaner code [imho]




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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     [CLOSED] How can I justify an item in a HEADING?

Copyright © 1996-2020 Information Builders