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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Filter Selection
 Login/Join
 
Platinum Member
posted
I am working on designing a procedure where users can have the option of selecting filters like 'EQ', 'LT', 'GT', 'GE', 'IN LIST', 'NE' and 'BETWEEN' when they run the report.

Please, any idea on how I can achieve this? Thank you.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
Platinum Member
posted Hide Post
Hi,

You can supply a parameter in the code like this: (WHERE &MYOPER can be GT,GE,EQ,NE,...etc, but not IN LIST or BETWEEN)

TABLE FILE EMPDATA
PRINT
PIN
LASTNAME
FIRSTNAME
BY SALARY
WHERE SALARY &MYOPER 50000
END

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Expert
posted Hide Post
You put a select list or radio button set in the html parameter form and then use Dialogue Manager to create the WHERE selection clause - with this method you can take care of all the possibilities. This, of course, will be a little harder to do if you're developing using only the GUI tools.


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
quote:
Originally posted by fatboyjim:
Hi,

You can supply a parameter in the code like this: (WHERE &MYOPER can be GT,GE,EQ,NE,...etc, but not IN LIST or BETWEEN)

TABLE FILE EMPDATA
PRINT
PIN
LASTNAME
FIRSTNAME
BY SALARY
WHERE SALARY &MYOPER 50000
END

Best Regards,

Jimmy Pang


Hi fatboyjim,
I understand your method but the problem I have is how to make one variable &MYOPER have more than one values like 'EQ', GT','NE' etc.

Please, any example?


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Francis Mariani:
You put a select list or radio button set in the html parameter form and then use Dialogue Manager to create the WHERE selection clause - with this method you can take care of all the possibilities. This, of course, will be a little harder to do if you're developing using only the GUI tools.


I know how to use a dialogue mgr but please can you let me know how to use it to give more than one values to a variable? Thank you


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
Gold member
posted Hide Post
TABLE FILE EMPDATA
PRINT
PIN
LASTNAME
FIRSTNAME
MIDINITIAL
DIV
DEPT
JOBCLASS
TITLE
SALARY
HIREDATE
AREA
WHERE SALARY &XSEL.(,,).Select the Filter TO USE. 50500;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
END


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
 
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003Report This Post
Expert
posted Hide Post
Please tell us how the parameters are passed to the WebFOCUS report program. The launch form needs at least two controls - one for the operator and one for the value(s). Only one value needs to be passed for the operator, ('EQ', 'LT', 'GT', 'GE', 'IN', 'NE' and 'BETWEEN'). One, two or more values needs to be passed for the value: one if the operator is EQ, GT, LT, LE, etc; two if the operator is BETWEEN; more than one if the operator is IN.


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
Hi,

I'm not sure if you are using a form to pass the parameters to the webFOCUS program. If you are, then you can use Javascript with the onchange event to display different value parameters you like depending on the operator selected. If you are using the auto prompt from webFOCUS, I'm not sure how to pick up the number of values selected.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by mrguru:
TABLE FILE EMPDATA
PRINT
PIN
LASTNAME
FIRSTNAME
MIDINITIAL
DIV
DEPT
JOBCLASS
TITLE
SALARY
HIREDATE
AREA
WHERE SALARY &XSEL.(,,).Select the Filter TO USE. 50500;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
END


Thank you guys. Here is what I wanted to achieve:

TABLE FILE FIELD_SALES
SUM
SALES
BY DEALER
HEADING
(display Country and year selected in report)
WHERE ( COUNTRY EQ '&COUNTRY.(FIND COUNTRY IN field_sales).COUNTRY.' )
AND ( YEAR EQ '&YEAR.(FIND YEAR IN FIELD_SALES).YEAR.' )
AND ( REPT_DATE (EQ,LT,GT,GE,NE) 'REPT_DT' )

My intention is to allow users to select (EQ,LT,GT,GE,NE). COUNTRY, YEAR and REPORT_DATE are drop down list.

Please, how do I relate the above to SALARY &XSEL.(,,).Select the Filter TO USE. 50500;

Thank you.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Francis Mariani:
Please tell us how the parameters are passed to the WebFOCUS report program. The launch form needs at least two controls - one for the operator and one for the value(s). Only one value needs to be passed for the operator, ('EQ', 'LT', 'GT', 'GE', 'IN', 'NE' and 'BETWEEN'). One, two or more values needs to be passed for the value: one if the operator is EQ, GT, LT, LE, etc; two if the operator is BETWEEN; more than one if the operator is IN.


Here is what I wanted to achieve:

TABLE FILE FIELD_SALES
SUM
SALES
BY DEALER
HEADING
(display Country and year selected in report)
WHERE ( COUNTRY EQ '&COUNTRY.(FIND COUNTRY IN field_sales).COUNTRY.' )
AND ( YEAR EQ '&YEAR.(FIND YEAR IN FIELD_SALES).YEAR.' )
AND ( REPT_DATE (EQ,LT,GT,GE,NE) 'REPT_DT' )

My intention is to allow users to select (EQ,LT,GT,GE,NE). COUNTRY, YEAR and REPORT_DATE are drop down list.
If it works in procedure, I can relate to html. I am using dropdown list in html to pass values to procedure

Thank you.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
Platinum Member
posted Hide Post
Is this something that you are looking for?

TABLE FILE FIELD_SALES
SUM
SALES
BY DEALER
HEADING
(display Country and year selected in report)
WHERE ( COUNTRY EQ '&COUNTRY.(FIND COUNTRY IN field_sales).COUNTRY.' )
AND ( YEAR EQ '&YEAR.(FIND YEAR IN FIELD_SALES).YEAR.' )
AND ( REPT_DATE (&MYOPER.(,,,,).Select Filter to Use.) 'REPT_DT' )


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by fatboyjim:
Is this something that you are looking for?

TABLE FILE FIELD_SALES
SUM
SALES
BY DEALER
HEADING
(display Country and year selected in report)
WHERE ( COUNTRY EQ '&COUNTRY.(FIND COUNTRY IN field_sales).COUNTRY.' )
AND ( YEAR EQ '&YEAR.(FIND YEAR IN FIELD_SALES).YEAR.' )
AND ( REPT_DATE (&MYOPER.(,,,,).Select Filter to Use.) 'REPT_DT' )


That is exactly what I wanted to achieve. I have tested with COUNTRY but I am getting the following error:

************
0 ERROR AT OR NEAR LINE 16 IN PROCEDURE field_sales
(FOC263) EXTERNAL FUNCTION OR LOAD MODULE NOT FOUND: COUNTRY
(FOC009) INCOMPLETE REQUEST STATEMENT
BYPASSING TO END OF COMMAND
**************
At least, country and filter list displayed except for the error above. My previos WHERE clause for COUNTRY is as below: WHERE ( COUNTRY EQ '&COUNTRY.(FIND COUNTRY IN field_sales).COUNTRY.' )

Here is the test code while trying to pass the country list from above:

TABLE FILE FIELD_SALES
SUM
PURCHASE_DEALER_COMMISSION
BY COUNTRY
WHERE ( YEAR1 EQ '2009' )
AND ( MONTH1 EQ '112009' )
AND ( COUNTRY (&MYOPER.(EQ,NE).Select Filter to Use.) '( COUNTRY EQ '&COUNTRY.(FIND COUNTRY IN FIELD_SALES).COUNTRY.' );

Thanks alot.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
Platinum Member
posted Hide Post
Try this to see if this helps.

TABLE FILE EMPDATA
PRINT
PIN
LASTNAME
FIRSTNAME
SALARY
WHERE SALARY &MYOPER.(,).Operator. &SALARY.(FIND SALARY IN empdata).SALARY.;

This gives you the option to change operator and the actual values populated from a table.


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Gold member
posted Hide Post
TABLE FILE EMPDATA
PRINT
PIN
LASTNAME
FIRSTNAME
MIDINITIAL
DIV
DEPT
JOBCLASS
TITLE
SALARY
HIREDATE
AREA
WHERE SALARY &XSEL.(,,).Select the Filter TO USE. 50500;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
END


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
 
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by fatboyjim:
Try this to see if this helps.

TABLE FILE EMPDATA
PRINT
PIN
LASTNAME
FIRSTNAME
SALARY
WHERE SALARY &MYOPER.(,).Operator. &SALARY.(FIND SALARY IN empdata).SALARY.;

This gives you the option to change operator and the actual values populated from a table.


fatboyjim,
I got it working. Thanks. The only correction I made was to put &SALARY.(FIND SALARY IN empdata).SALARY. in singly quotation.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders