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.
I am fairly new to WebFocus and not aware of all that it can do.. Currently using WF 7.7.03 Developer Studio where I created a SQL pass thru report.. For this report I need a user input parameter in the form of drop-down list which is dynamic or obtained from a field from one of the table's from my SQL query... How do I build a drop-down list for a SQL pass thru report?
Example:
SELECT A, B, C FROM TABLE A Where date = &Date (user selected from drop-down list of dates)
The drop-down should look like 01/01/2016, 01/02/2016, etc.
I tried using this: '&variable.(FIND fieldname IN datasource).[description.]' .. but it throws an error since SQL pass thru reports don't have a master file...
Please help.. Thanks!This message has been edited. Last edited by: Tamra,
I tried this on the Northwind Orders table and it seems to work.
ENGINE SQLMSS SET DEFAULT_CONNECTION MY_SQL_CONN
SQL SQLMSS PREPARE SQLOUT FOR
SELECT * FROM ORDERS
END
TABLE FILE SQLOUT
PRINT
Freight
ShipName
ShipAddress
ShipCity
ShipRegion
ShipPostalCode
ShipCountry
BY LOWEST OrderID
BY LOWEST CustomerID
BY LOWEST EmployeeID
BY LOWEST OrderDate
BY LOWEST ShipVia
WHERE ShipCountry EQ &ShipCountry.(FIND ORDERS.ORDERS.SHIPCOUNTRY,ORDERS.ORDERS.SHIPCOUNTRY IN orders|FORMAT=A15V).ShipCountry:.QUOTEDSTRING;
END
I think you'll need to have a synonym for orders to be used in the WHERE test.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
I'm not sure if I understand. Could you post an example of what you're doing and the error it causes? The code above is an example. Specifically, look at the WHERE test. It is doing a FIND off of the WebFOCUS synonym for orders not the actual table.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
Here's an example of the WHERE test using the Orderdate field
TABLE FILE SQLOUT
PRINT
Freight
ShipName
ShipAddress
ShipCity
ShipRegion
ShipPostalCode
ShipCountry
BY LOWEST OrderID
BY LOWEST CustomerID
BY LOWEST EmployeeID
BY LOWEST ShipVia
WHERE OrderDate EQ DT(&OrderDate.(FIND ORDERS.ORDERS.ORDERDATE,ORDERS.ORDERS.ORDERDATE IN orders|FORMAT=HYYMDs).OrderDate:.);
ON TABLE PCHOLD FORMAT HTML
END
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
I still get the same error: (FOC205) The description cannot be found for file named: "DW"
Here's my code: ENGINE SQLORA SET DEFAULT_CONNECTION DWQA SQL SQLORA PREPARE SQLOUT FOR SELECT A.ABC AS "ABC" ,A.XYZ AS "XYZ" ........... ........... FROM REPORTS.TABLE1 A WHERE EXISTS (SELECT 1 FROM DW.RUN_PERIOD B WHERE B.PERIOD = A.PERIOD) AND A.PERIOD = '&B_PERIOD' END TABLE FILE SQLOUT PRINT ABC XYZ ....... ....... WHERE PERIOD EQ &B_PERIOD.(FIND DW.RUN_PERIOD.PERIOD, DW.RUN_PERIOD.PERIOD IN DW.RUN_PERIOD).PERIOD ON TABLE SUBHEAD ............ ............ END
Ensure you have created a synonym/master file for all tables/views being used; and ensure that they are accessible to the domain they are being called from if working in the managed reporting area (check if they are in the app path for that domain).
If you're just working in the reporting server area, then ensure your qualifiers are correct.
Thanks for your response.. But I am working on a SQL pass thru report which does not use a master file and hence faced this problem with creating a dynamic drop down list for user-input parameters...
Any thoughts if I don't have a master file to use for this?
You can run a SQL Passthru to create a list of values for the where test, HOLD the output to a temp file and then use that list of values for your actual request. You'll still have to use the synonym for a drop down list but the synonym is for the HOLD file which is created dynamically. Something like this:
SQL SQLMSS PREPARE SQLOUT FOR
select orderdate from orders
END
TABLE FILE SQLOUT
BY orderdate
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS 'baseapp/od_lov' FORMAT BINARY
END
SQL SQLMSS PREPARE SQLOUT FOR
SELECT * FROM ORDERS
END
TABLE FILE SQLOUT
PRINT
Freight
ShipName
ShipAddress
ShipCity
ShipRegion
ShipPostalCode
ShipCountry
BY LOWEST OrderID
BY LOWEST CustomerID
BY LOWEST EmployeeID
BY LOWEST OrderDate
BY LOWEST ShipVia
WHERE OrderDate EQ DT(&OrderDate.(FIND OD_LOV.OD_LOV.orderdate,OD_LOV.OD_LOV.orderdate IN od_lov|FORMAT=HYYMDs).OrderDate:.);
END
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015