Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Guided Ad-Hoc Column Titles

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Guided Ad-Hoc Column Titles
 Login/Join
 
Gold member
posted
Hi - I am building a guided ad-hoc application that includes multiple measures. I'm trying to figure out how to apply the column titles to the measure(s) that the user picks. The database name(s) of the field(s) are too wordy, so I need something more useful. The only way I've found to do it so far is to create a define for that field and name it something close..but I can't use dollar signs or % signs in the title. Here's a snippet of my code:

SUM
COMPUTE GP%/D12.2 = ( SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_GP_DLRS / SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_PRICE ) * 100;
&Measures.(AND(,BY &PrimarySort.(,).PrimarySort
BY &SecondarySort.(,,).SecondarySort




Any suggestions are appreciated!!

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


WebFOCUS 7.7.03
Linux / Universe Db
HTML/PDF/EXCEL/HTML Active
 
Posts: 90 | Registered: November 03, 2009Report This Post
Gold member
posted Hide Post
Sorry - it looks like some of my code got wiped out in the paste. I'll try to repost.


WebFOCUS 7.7.03
Linux / Universe Db
HTML/PDF/EXCEL/HTML Active
 
Posts: 90 | Registered: November 03, 2009Report This Post
Expert
posted Hide Post
You need to wrap your code with CODE tags: [TIP] Including code in your FocalPoint Post


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
You could use the AS 'title text' feature to set column titles for your reports. You can do so for each report, or create a FEX containing the desired column titles and -INCLUDE that FEX as needed.

SUM 
COMPUTE GP_PCT/D12.2 = ( SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_GP_DLRS /
                         SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_PRICE ) * 100; AS 'GP %'


or

TITLES.FEX:
-SET &GPPCT_TITLE = 'GP %';
-SET &blah1_TITLE = 'blah1';
-SET &blah2_TITLE = 'blah2';
ETC.


REPORT.FEX:
-INCLUDE TITLES [or -MRNOEDIT -INCLUDE TITLES]

TABLE FILE filename
SUM 
COMPUTE GP_PCT/D12.2 = ( SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_GP_DLRS /
                         SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_PRICE ) * 100; AS '&GPPCT_TITLE'


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
Thank you for the tip! Here's the code I'm working with:
 SUM 
     COMPUTE GP%/D12.2 = ( SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_GP_DLRS / SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_PRICE ) * 100; AS 'GP%'
     &Measures.(AND(<QTY,SALES_COMPLETE_US.SALES_COMPLETE_US.QTY>,<Sales $,SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_PRICE>,<Cost $,SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_COST>,<GP$,SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_GP_DLRS>,<GP%,SALES_COMPLETE_US.SALES_COMPLETE_US.GP>)).Select Measures.
 


I'm able to get a column title for the COMPUTE field, but I'm trying ti get titles for the options available in my list. Even though I have the 'value' set at "Sales $" for EXTENDED_FET_PRICE, when I run the procedure through the guided ad-hoc launch page, it gives me EXTENDED_FET_PRICE as the column heading.


WebFOCUS 7.7.03
Linux / Universe Db
HTML/PDF/EXCEL/HTML Active
 
Posts: 90 | Registered: November 03, 2009Report This Post
Virtuoso
posted Hide Post
When generating the execution code, the parser puts single quotes around column names from your prompt, which causes syntax errors if you try to include AS 'title text' phrases in standard syntax. However, you can "trick" the parser through opportune placement of single quotes in your prompt, like this:

&Measures.(AND(<QTY,SALES_COMPLETE_US.SALES_COMPLETE_US.QTY' AS 'Qty>,
               <Sales $,SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_PRICE' AS 'Sales $>,
               <Cost $,SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_COST' AS 'Cost $>,
               <GP$,SALES_COMPLETE_US.SALES_COMPLETE_US.EXTENDED_FET_GP_DLRS' AS 'GP $>,
               <GP%,SALES_COMPLETE_US.SALES_COMPLETE_US.GP' AS 'GP %>)).Select Measures.

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
Thank you! That was the right tip, except that I had to put it in my HTML code in the composer/parameters tab instead of in my procedure code.

Nonetheless..it worked! Much appreciated Smiler


WebFOCUS 7.7.03
Linux / Universe Db
HTML/PDF/EXCEL/HTML Active
 
Posts: 90 | Registered: November 03, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Guided Ad-Hoc Column Titles

Copyright © 1996-2020 Information Builders