Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Decimal values in headers add spaces before the number
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Decimal values in headers add spaces before the number
 Login/Join
 
Platinum Member
posted
Hi
I am getting data from DB using SQL passthru and holding it in a hold file.Then I am using that hold file to print a WP format report.

When i use amount fields(D22.2 and D22.2cM) in my header there is a lot of space before the number.Earlier we used defines to convert into Alpha, used LJUST to left justify it and then use it in the headers.
Is there any other way to remove the spaces.I am trying to get rid of the defines.

WF8105

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 152 | Registered: October 25, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You should not have to convert to Alpha then Justify your field to add it in a header.
Maybe just to set the proper display format.

Try below and share the result you have
TABLE FILE CAR
SUM COMPUTE TSAL/D8.2CM = SALES; NOPRINT
HEADING
"Display As Field Definition : <SALES"
"Desired Field Display : <TSAL"
ON TABLE SET PAGE-NUM NOLEAD
END


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2071 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi Martin,
I already tried with car file.It is working fine in there.Something happens when i do this with using my DB table.

FLD1 E01 A9V
FLD2 E02 P17.2
FLD3 E03 A2V
FLD4 E04 P10
FLD5 E05 A52V
FLD6 E06 A10V
FLD7 E07 A20V
FLD8 E08 D20.2
FLD9 E09 A40V
FLD10 E10 D20.2
FLD11 E11 A40V

This is the structure of my hold file.
I first conver the decimals D20.2 to D22.2cM and then make them LJUST.

I tried computes and then use it header it is still the same.

This message has been edited. Last edited by: Siva1925,
 
Posts: 152 | Registered: October 25, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Just try use || in the define you have and append a single white space.
|| will remove all white space.
This is not a solution it is a workaround if you are not finding any other solution.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 198 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi srajeevan,
The fields i am using are decimals so i cannot append string to it.

But i can convert the field to an Alpha.
I tried that and that also leaves some space before the number.

I guess this is because it is right aligned by default.Since my output is in WP format i cannot use style sheets .Is there a way to left align them without using defines?

This message has been edited. Last edited by: Siva1925,
 
Posts: 152 | Registered: October 25, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
What are the ACTUAL and USAGE formats as seen within the synonym?


   See you at Summit! In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS.
   Currrently using 8204 Gen 48 in Test and Production.
   KGPCo at CenturyLink. October 2017 to Present...
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Sorry, haven't pay attention to your output format. But, you'll probably not be able to avoid defines/computes except if the USAGE may solve it

Maybe this may suit your need
TABLE FILE CAR
SUM COMPUTE TSAL/A20V = TRIM_(BOTH, ' ', FPRINT(SALES, 'D15.2CM', 'A20V')); NOPRINT
HEADING
"Display As Field Definition : <SALES"
"Desired Field Display : <TSAL"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS baseapp/testwp FORMAT WP
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
END


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2071 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Decimal values in headers add spaces before the number

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.