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] Pass Date in DropDown List as Arg to Report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Pass Date in DropDown List as Arg to Report
 Login/Join
 
Member
posted
I've created a launch page with a dropdown list using DevStudio. The dropdown list is populated w/ dates in reverse order obtained from a Sybase database table. On a tab structure, a report summary is generated from the same table using a date selected from the dropdown.

I have a problem passing this date to generate the report. Have tried the "...where = '&comboboxname'..." stuff; that doesn't seem to work.

I'm a newbie in developing WF stuff; appreciate any help you can offer.

Thanx,
Bil

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


WF 7.7.02 / Unix /Excel, PDF
AIX / DB2 / Sybase
 
Posts: 7 | Location: NH | Registered: July 30, 2007Report This Post
Virtuoso
posted Hide Post
First off, I would temporarily place

-? &
-EXIT

at top of the fex, to show what parameter values it receives from the launch page.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Hi Bil, Welcome to the forum.




If you could also tell us the format of the Date field in the database ?

You can get this from the Master file.

This is needed because tests against dated need to be the correct format.


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
Member
posted Hide Post
first: thanx for assisting!

now:
1. bnk_stl_date is a Sybase datetime field

2. .mas entry is:

FIELDNAME=BNK_STL_DATE, ALIAS=bnk_stl_date, USAGE=HYYMDs, ACTUAL=HYYMDs,
MISSING=ON, $

further down, there is also:

COMPUTE SettleDateMDYY/A20=HCNVRT(BNK_STL_DATE, '(HMDYY)', 10, 'A10');,
TITLE='SettleDateMDYY', $

(not sure if this does anything)

3. embedded procedure to populate the dropdown:

TABLE FILE REPO_AGRMT
SUM FST.REPO_AGRMT.REPO_AGRMT.BNK_STL_DATE
BY HIGHEST REPO_AGRMT.REPO_AGRMT.BNK_STL_DATE
// TODO: Add your filters here to replace defaults
ON TABLE PCHOLD FORMAT XML
END

this appears to be ok

4. here's the where clause

WHERE REPO_AGRMT.REPO_AGRMT.BNK_STL_DATE EQ '&combobox4';

5. adding "-? @..." at top of .fex didn't do anything (that I saw...)

hope this helps...
bil


WF 7.7.02 / Unix /Excel, PDF
AIX / DB2 / Sybase
 
Posts: 7 | Location: NH | Registered: July 30, 2007Report This Post
Expert
posted Hide Post
Hi Bil,

The reason for the -? &, is to see what format the date is when it is assigned to the & variable.

You may have to also *** -SET &ECHO=ALL; before it.

If you are filtering against a DateTime field, then you will probalby need to use the DT function.

But first we need to know the contents of the & variable &combobox4.

Add the code:
-SET &ECHO=ALL;
-? &
-EXIT

And let us know what &combobox4 is set to.


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
Member
posted Hide Post
ok; that did the trick!

&combobox4 = 20110317000000000

(Mar. 17, 2011 - the highest date in the table; this is correct).

Soooo... is dt('&combobox4') needed in the where clause?


WF 7.7.02 / Unix /Excel, PDF
AIX / DB2 / Sybase
 
Posts: 7 | Location: NH | Registered: July 30, 2007Report This Post
Expert
posted Hide Post
Yes DT(&combobox4), no need for quotes.

But just to be sure, this will be an exact match to Date and Time, is this what you want ?


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
Member
posted Hide Post
yes, the dropdown list was populated from the same table; we want exact matches here...

this appears to work, at least for the opening report. i tried selecting another date from the dropdown, and clicking on the ?rerun? button, but it didn't refresh with the second date (ultimately combobox.onchange should refresh this report). will item1.refresh reload the report using the currently selected date?


WF 7.7.02 / Unix /Excel, PDF
AIX / DB2 / Sybase
 
Posts: 7 | Location: NH | Registered: July 30, 2007Report This Post
Member
posted Hide Post
update: apparently this is not working.

the initial report is always coming up w/ the latest date's data, even when combobox has earliest date (sorting by lowest vs. highest).

this would indicate the where clause is ineffective

any further suggestions?


WF 7.7.02 / Unix /Excel, PDF
AIX / DB2 / Sybase
 
Posts: 7 | Location: NH | Registered: July 30, 2007Report This Post
Expert
posted Hide Post
Can you post you new code ?


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
  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] Pass Date in DropDown List as Arg to Report

Copyright © 1996-2020 Information Builders