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] Assign parameter value to a varible to be included in report output?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Assign parameter value to a varible to be included in report output?
 Login/Join
 
Gold member
posted
Is there a way that you can assign parameter(s) values to variables so the parameter values can be include in the output of a report.

Example:

TABLE FILE CENTORD
PRINT
'CENTORD.OINFO.ORDER_NUM'
'CENTORD.STOSEG.STORENAME'
'CENTORD.OINFO.DATE_ORDERED'
'CENTORD.INVSEG.PRICE'
WHERE ( CENTORD.OINFO.DATE_ORDERED GE '&SD.START.' ) AND ( CENTORD.OINFO.DATE_ORDERED LE '&ED.END.' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
ENDSTYLE
END



Entering 10/19/2001 for &SD and &ED results in the following output

Order Number: Store Name: DATE_ORDERED Price:
48219 Web Sales 10/19/2001 899.00
48219 Web Sales 10/19/2001 109.00
48219 Web Sales 10/19/2001 89.00
48219 Web Sales 10/19/2001 499.00
48219 Web Sales 10/19/2001 299.00

What I would like to do is to include the report parameters values in the output so the output would look like the following:

Order Number: Store Name: DATE_ORDERED Price: Param1 Param2
48219 Web Sales 10/19/2001 899.00 10/19/2001 10/19/2001
48219 Web Sales 10/19/2001 109.00 10/19/2001 10/19/2001
48219 Web Sales 10/19/2001 89.00 10/19/2001 10/19/2001
48219 Web Sales 10/19/2001 499.00 10/19/2001 10/19/2001
48219 Web Sales 10/19/2001 299.00 10/19/2001 10/19/2001

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


7.7.02 Windows7
HTML/Excel/PDF
 
Posts: 66 | Registered: April 16, 2008Report This Post
Expert
posted Hide Post
TABLE FILE CENTORD
PRINT
'CENTORD.OINFO.ORDER_NUM'
'CENTORD.STOSEG.STORENAME'
'CENTORD.OINFO.DATE_ORDERED'
'CENTORD.INVSEG.PRICE'
COMPUTE SD/A10 = '&SD'; AS 'Param1'
COMPUTE ED/A10 = '&ED'; AS 'Param2'
WHERE ( CENTORD.OINFO.DATE_ORDERED GE '&SD.START.' ) AND ( CENTORD.OINFO.DATE_ORDERED LE '&ED.END.' );


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
Platinum Member
posted Hide Post
How about assigning the parameter to a define field and call that Define field in your table request.


Rao.


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio

 
Posts: 104 | Location: Indianapolis | Registered: November 08, 2007Report This Post
Platinum Member
posted Hide Post
Francis has better solution performance wise.

Rao.


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio

 
Posts: 104 | Location: Indianapolis | Registered: November 08, 2007Report This Post
Gold member
posted Hide Post
Thanks Francis! It worked just as you stated. I had spent hours going through on-line documentation, scouring over messages in the WebFocus forums and had even tried using the Compute to assign the parameter values to a variable but kept getting errors. Looking at your solution the main problem was I was not using the ' ' around the &SD and &ED field names.

I was strictly using the menu options in WebFocus to create a Compute variable but when I clicked on the &SD and &ED fields to assign to variables, the ' ' are not automatically placed around the variable as per your suggestion.

Thanks again for your assistance.

P.S. Are you aware if the use of the ' ' around the variables is documented in any of the WebFocus manuals. I've searched but didn't come up with any hits.

Jeff


7.7.02 Windows7
HTML/Excel/PDF
 
Posts: 66 | Registered: April 16, 2008Report This Post
Expert
posted Hide Post
Jeff,

If you think of it logically then the value you had for your variable would be interpretted as a calculation if not surrounded by single quotes. This result (numeric) would then be rejected as incompatable data type for an alpha field.

If you had specified a MDYY field then you may have had success.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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] Assign parameter value to a varible to be included in report output?

Copyright © 1996-2020 Information Builders