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     [SOLVED] problem with subtotal dynamic format change
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] problem with subtotal dynamic format change
 Login/Join
 
Gold member
posted
Hi,

I am facing problem with subtotal format. I am able to change the format of the column data dynamically but subtotal format i am not able to change. can anyone tell me a way to change the format of subtotal as well?

TABLE FILE CAR
SELECT * FROM CAR
END

DEFINE FILE CAR
DISP_FORMAT/A10 = IF COUNTRY EQ 'FRANCE' OR COUNTRY EQ 'ITALY' THEN 'D30C' ELSE 'D30.2CM';
END

TABLE FILE CAR
SUM RCOST/DISP_FORMAT
BY COUNTRY BY CAR
ON COUNTRY SUBFOOT
"MY OWN TEXT COST IS END

Thanks in advance

This message has been edited. Last edited by: santu,


Web FOCUS 7.7.03
PDF
 
Posts: 69 | Registered: May 24, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
How would the SUBTOTAL know which of the two formats to use?
 
Posts: 3052 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
Yes and how to display in correct format?

I think my code was missing. please refer the below code.

when i use SUBTOTAL then it is working for me but i wanted to use SUBFOOT only because of below points.
1.total label and total amounts are not coming in one line
2.I wanted to give red color to the values when it is negative.

Is there any way to give red color to subtotal if we use SUBTOTAL?


 TABLE FILE CAR
SELECT * FROM CAR
END
 
DEFINE FILE CAR
DISP_FORMAT/A10 = IF COUNTRY EQ 'FRANCE' OR COUNTRY EQ 'ITALY' THEN 'D30C' ELSE 'D30.2CM';
END
 
TABLE FILE CAR
SUM RCOST/DISP_FORMAT
BY COUNTRY BY CAR
ON COUNTRY SUBFOOT 
"MY OWN TEXT COST IS <ST.RCOST "
END
 


Web FOCUS 7.7.03
PDF
 
Posts: 69 | Registered: May 24, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
SET PAGE = NOLEAD
DEFINE FILE CAR
DISP_FORMAT/A10 = IF COUNTRY EQ 'FRANCE' OR COUNTRY EQ 'ITALY' THEN 'D30C' ELSE 'D30.2CM';
RCOST1/D15C =     IF COUNTRY EQ 'FRANCE' OR COUNTRY EQ 'ITALY' THEN RCOST ELSE 0;
RCOST2/D15.2CM =  IF COUNTRY NE 'FRANCE' OR COUNTRY EQ 'ITALY' THEN RCOST ELSE 0;
END
TABLE FILE CAR
SUM
	RCOST/DISP_FORMAT
BY  COUNTRY
BY  CAR
ON COUNTRY SUBFOOT
"MY OWN TEXT COST IS: <+0> <ST.RCOST1 "
WHEN COUNTRY EQ 'FRANCE' OR 'ITALY'

ON COUNTRY SUBFOOT
"MY OWN TEXT COST IS: <+0> <ST.RCOST2 "
WHEN COUNTRY NE 'FRANCE' OR 'ITALY'
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-*TYPE=REPORT, ORIENTATION=LANDSCAPE, GRID=ON, WRAP=OFF, SIZE=9, FONT=ARIAL,$
TYPE=SUBFOOT, LINE=1, BACKCOLOR=SILVER, ITEM=1, COLSPAN=2,  $
TYPE=SUBFOOT, LINE=1, BACKCOLOR=RED, ITEM=3, COLSPAN=3, WHEN=RCOST GT 50000,  $
ENDSTYLE
END 
 

This message has been edited. Last edited by: Spence,


WF 8 version 8.2.01M. Windows.
In focus since 1990.
 
Posts: 188 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Very Interesting Smiler
 
Posts: 3052 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
Brilliant..

Thank you for code snippet.

Its working.


Web FOCUS 7.7.03
PDF
 
Posts: 69 | Registered: May 24, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] problem with subtotal dynamic format change

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