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.
I need to add an extra column on the right for example "NOTES". It will contain some hard coded alpha characters that correspond to each of the rows. So for DEALER_COST, it would be something like 'ddddd' and for RETAIL_COST it would be 'rrrrr'
the output would look something like:
COUNTRY
ENGLAND FRANCE ITALY JAPAN W GERMANY NOTES
DEALER_COST 37,853 4,631 41,235 5,512 54,563 ddddd
RETAIL_COST 45,319 5,610 51,065 6,478 64,732 rrrrr
I was provided with McGyver technique. But was hoping for something simpler.
Thank you.This message has been edited. Last edited by: nickz,
This could be one way from several options. As per example, you may use dynamic format instead of FPRINT function The challenge is regarding the fact that your final output is using the ACROSS with the Note at the right. So, it need to be "manually" placed there Also you need to mix numeric and alpha data in the measures section of the report
TABLE FILE CAR
SUM COMPUTE RC/A10 = FPRINT(RETAIL_COST, 'D7', 'A10');
COMPUTE DC/A10 = FPRINT(DEALER_COST, 'D7', 'A10');
BY TOTAL COMPUTE COLID /I2 = 1;
BY COUNTRY
ON TABLE HOLD AS TMP1
END
-RUN
TABLE FILE CAR
SUM COMPUTE RC/A10 = 'rrrrr';
COMPUTE DC/A10 = 'ddddd';
BY COUNTRY NOPRINT
BY TOTAL COMPUTE COLID /I2 = 99;
BY TOTAL COMPUTE COUNTRY /A10 = 'NOTES';
WHERE READLIMIT EQ 1;
WHERE RECORDLIMIT EQ 1;
ON TABLE HOLD AS TMP2
END
-RUN
TABLE FILE TMP1
SUM RC
DC
BY COLID
BY COUNTRY
ON TABLE HOLD AS RPTDATA
MORE
FILE TMP2
END
-RUN
TABLE FILE RPTDATA
SUM DC AS 'Dealer Cost' OVER
RC AS 'Retail Cost'
ACROSS COLID NOPRINT
ACROSS COUNTRY AS 'Country'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA,
ACROSSCOLUMN=DC,
JUSTIFY=RIGHT,
$
TYPE=DATA,
ACROSSCOLUMN=RC,
JUSTIFY=RIGHT,
$
ENDSTYLE
END
-RUN
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
NICE! That's definitely 'Thinking Outside The Box'...
I just enhanced the 'Already Successful' code by changing the 'TYPE=DATA' lines as follows (during my analysis of your code, building on your success):
TYPE=DATA, JUSTIFY=RIGHT, $
TYPE=DATA, ACROSSCOLUMN=DC, JUSTIFY=LEFT, WHEN = DC GE 'A',$
TYPE=DATA, ACROSSCOLUMN=RC, JUSTIFY=LEFT, WHEN = RC GE 'A',$
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005