Focal Point
Formatting Workarounds

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3341019372

February 29, 2008, 02:32 AM
nubi
Formatting Workarounds
Hi,

Ive had a request which i know isn't possible to do with native WebFOCUS code. I have a report which has an amount figure for various departments for a period but the amounbt figure for one account is actually a headcount where the rest are amounts of money. Therefore ive used a D11.2C format, but im being asked if i can set the number for the headcount to not have the currency sign yet keeping it in the same column:

at the moment mine looks like this:

account amount
overheads £199
headcount £150

wheras we'd like it like this:

account amount
overheads £199
headcount 150


and yes they do require it in the same column.

I know that formally it won't work using basic coding as the it defies the convention of the code but are there any work arounds you can think of?


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 29, 2008, 03:16 AM
Tony A
Nubi,

I don't know who told you that it can't be done in WF, because it can. It used to be documented in DS help files but I can't locate it in 7.1.6 Frowner

Anyway, from my archives, I have an example that shows how the format of a column can be change depending upon the value of a BY field -

DEFINE FILE GGSALES
  CFORMAT/A8 = IF ST EQ 'CA' OR 'CT' OR 'FL' THEN 'P18CBM'
      ELSE IF ST EQ 'GA' OR 'IL' OR 'MA' THEN 'P18CB!E'
      ELSE IF ST EQ 'MO' OR 'NY' OR 'TN' THEN 'P18CB!L'
      ELSE IF ST EQ 'TX' THEN 'P18!Y' ELSE 'P18CBM';
  MYDOLLARS/P18CB = DOLLARS;
END
-*
TABLE FILE GGSALES
SUM MYDOLLARS/CFORMAT
BY ST
HEADING
"Output Format Test"
""
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOPAGE
ON TABLE SET NODATA ''
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='A4', SQUEEZE=ON, ORIENTATION=LANDSCAPE,
LEFTMARGIN=0.3, RIGHTMARGIN=0.3, TOPMARGIN=0.3, BOTTOMMARGIN=0.3, $
TYPE=REPORT, GRID=ON, TOPGAP=0.02, BOTTOMGAP=0.02,
FONT='HELVETICA', SIZE=10, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, $
TYPE=HEADING, LINE=3, ITEM=2, WRAP=8.5, $
-*TYPE=SUBFOOT, HEADALIGN=INTERNAL, $
TYPE=REPORT, COLUMN=P2, WRAP=6, $
ENDSTYLE
END

Should be quite straight forward to understand ... I hope Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 29, 2008, 04:57 AM
nubi
Excellent, thanks Tony A.

It's actually one of those solutions that makes you slap your head because its so obvious (well kind of) but which i'd have never have thought of on my own.

cheers!


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 29, 2008, 05:47 AM
Tony A
quote:
slap .... head
You've seen my photograph haven't you Wink



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 29, 2008, 07:14 AM
nubi
haha, haven't heard that phrase in a while.

thanks again.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 29, 2008, 08:26 AM
mgrackin
Sounds like we need a new emoticon to represent a slap-head.

We could put Tony's picture on it! Big Grin


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
February 29, 2008, 10:07 AM
Tony A
Mickey,

Remind me to visit you at Summit Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 29, 2008, 10:57 AM
RickW
I find that dynamic format to be one of those hidden gems especially when you have a complex report with mixed numerics and alphas that have to line up.


WebFOCUS 7.6.6/TomCat/Win2003,SQL Server 2005,Oracle
March 03, 2008, 03:48 AM
nubi
yeah im continually more and more impressed by these little tricks you can do with WF.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor