|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Platinum Member |
I want my column heading to change depending on the data. Is there a way to do this without doing a compound report?
I currently have it working by using a subhead but if my report goes to a 2nd page, the original column headings appear and I want the subheading to appear instead of the column headings since the data at the point is my indices information. My data_type is either category information (A) or indices information (I). My description field should be called category if my data_type eq 'A' or it should be called indices if my data_type eq 'I'. My category information appears first so I have table file car print description as 'category' marketvalue as 'market value' pct.marketvalue as '% of total' end My columns for category information are: category market value % of total and for indices information: indices market value % of total I tried putting an if statement in my print and changing the column heading depending on data_type but that didn't work. Any suggestions? |
||
|
|
Gold member |
try this
-set &heading/a8= if description eq 'a' then 'category' else if description eq 'i' then 'indices'; table file car print description as '&heading' marketvalue as 'market value' pct.marketvalue as '% of total' end |
|||
|
|
Virtuoso |
Wanting to try something of course the CAR file doesn't have the fields, but I did some playing, of course this doesn't line up well in HTML nor excel, but:
-*just so I could force a page - break SET LINES = 14 SET STYLEMODE = FIXED DEFINE FILE CAR COUNTEX/I2 WITH MODEL = (COUNTEX + 1); REM/I1 WITH MODEL = IMOD ( COUNTEX, 2, REM ); DESCRIPTION/A1 WITH MODEL = IF REM EQ 0 THEN 'A' ELSE 'I'; MARKETVALUE/D12.2 = RETAIL_COST; HEADMARK/A10 WITH MODEL = IF DESCRIPTION EQ 'A' THEN 'CATEGORY' ELSE 'INDICES'; END TABLE FILE CAR HEADING "<HEADMARK MARKET VALUE % OF TOTAL PAGE: <TABPAGENO" " " PRINT DESCRIPTION AS '' MARKETVALUE AS '' PCT.MARKETVALUE AS '' BY DESCRIPTION NOPRINT ON DESCRIPTION *-put in so if you don't page-break on the indices you will get the title change SUBHEAD " " "INDICES MARKET VALUE % OF TOTAL" " " WHEN DESCRIPTION EQ 'I' AND TABPAGENO GT 1 END |
|||
|
|
Virtuoso |
ON my last post should most likely not have left the tabpageno in it.
|
|||
|
|
Expert |
this works like a charm(i'm in 525):
-SET &HDCOST = IF &WHICHCOST EQ 'STCOS' THEN 'Standard Cost' ELSE 'Actual Cost'; ... then in your code, not only the &var as a header but also a mouseover with info ( a bonus). COST AS '<span title="Units * STSOC or STACC "> &HDCOST *,(d)</span>' key is to make sure your &HDCOST header thing is separated by a blank before and after when you stick it in your AS phrase. |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

