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] Checkboxes for rows in a report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Checkboxes for rows in a report
 Login/Join
 
Guru
posted
I have the following scenario.

I would like the users to be able to select employees from the Employee database based on first name and last name. I would like to show the first name and last name as separate fields so that they can choose to sort on each column (using a self-drilldown technique or the like). How can I give them a webpage that will give them this information with the ability to select the items (I'm thinking checkboxes to the left of each row)? Any ideas?

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


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
I think we need more information.

Do you mean a web page that is the result of aa report ?

Have you thought about embedding HTML in the report, there are many examples here in the forum.

The next question is what are you going to do with the selected employees ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Last question first - I want to pass the selected employees as a variable along to a report that the user will run when hitting the "Run" button on the HTML page. Which I guess answers the first question - this is a launch page for a report that I would like to include this or similar functionality into.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
Maybe I don't completely understand what you want to do but creating a report with the employess names set up to drill down to another report seems to me to be easier than what you want to do.

Unless, of course, you want to pass multiple employees. In that case, as Waz said, there is a recent post on text boxes in html that might be useful to you.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Yes, I would like to pass multiple employees (amongst other parameters I am passing from the launch page). I will search for the post you are referring to.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Guru
posted Hide Post
OK - I found the post you were referring to and I followed it and put checkboxes in my report and I'm embedding that report in my launch page. The question now is how do I pass the selected values from the embedded report (along with other selections that were made in the launch page) when I hit the submit button?


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
If you practiced what was in that post, you will see that the boxes were passed as input variables which will be sent along with the form.

You can create a dummy focexec that is executed when the button is pushed and put a -? in it to see the variables and their contents.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
So is it that I must do it with a procedure that has the fex with the defines that create the checkboxes in HTML and then an HTMLFORM that uses !IBI.FIL....?

I'm not sure that would work for me as I'm trying to do this as an independent launch page.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
quote:
I want to pass the selected employees as a variable along to a report that the user will run when hitting the "Run" button on the HTML page.


This is what you said. You have to write a report focexec that will run when the button is pushed and take the variables selected on your page and use them in a WHERE clause.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Channy --

If you give all the checkboxes the same HTML NAME attribute (say, EMP), they will act much like a multi-select listbox. Whenever the CGI receives identically names parameters, it converts them to a counter and a list of indexed parameters, so that each will come across in its own distinct &var.

If exactly one is checked, it gets passed as is -- the fex is in effect called with
EMP=value
and the dialog manager variable &EMP will contain the VALUE of the checked item.

If more than one is checked, the fex receives a list: a count in &EMP0, and values in &EMP1, &EMP2, .... (&EMP will also exist, with the same value as &EMP1)
If none checked, neither &EMP nor &EMP0 will exist.


You construct the necessary WHERE statement inline, at the appropriate spot within the TABLE request. (You could instead construct a &var containing the appropriate WHERE clause up front, but it's not advisable unless the field is numeric.) It was a pretty standard method before the advent of autoprompt.

Test for the existence of &EMP0 (first), and of &EMP (second), and branch accordingly -- either constructing
WHERE var IN (&EMP1, &EMP2, ...);
using a -REPEAT loop; or
WHERE var EQ &EMP;
or skipping the WHERE altogether.
(If the field is alpha, add .QUOTESTRING to all the &EMP references.)


You will need to suppress autoprompt for &EMP0 and &EMP (or whatever your parameters are named). One way is to include unreachable -SET statements, so the autoprompt scan will think they are local variables rather than parameters.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
I guess I'm not being clear as to what I'm trying to do. I am familiar with passing checkbox values back to a fex with an appropriate WHERE and loop to test for the values. The problem I am having is that I included the report that has the rows with the checkboxes in HTML page that I am developing using DevStudio - HTML Painter. The report references the procedure and lives within an iFrame. When I hit the submit button, the checkbox is not being passed along with other values that have been input via various other controls (listboxes, radio buttons) etc. I assume it's because there is no XML variable setup for it. The question is how I can get the report that is in the iFrame to pass along it's selections to the HTML file that it lives in.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
Take your report code out of your html page and put it in its own focexec. I use the HTML Painter as well but I never put the report code in the html. I always write and debug the report separately before I create the page.

We each have our own development style and mine works well for me. You might want to re-think your architecture. Several discreet easy pieces are easier to manage than one complicated one.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report 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] Checkboxes for rows in a report

Copyright © 1996-2020 Information Builders