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 believe there's a technique for this. Reporting from MSS Table-Valued Functions can be done via synonym for SQL string containing a SELECT * FROM with parameters list. Create synonym for External SQL Script and add Variable definition (VARIABLE NAME=&&VARNAME) to the synonym.
For example:
1.
Assume there is a MS SQL Table-Valued Function defined as
CREATE FUNCTION dbo.ufnGetContactInformation(@ContactID int)
RETURNS @retContactInformation TABLE
(
-- Columns returned by the function
ContactID int PRIMARY KEY NOT NULL,
FirstName nvarchar(50) NULL,
LastName nvarchar(50) NULL,
JobTitle nvarchar(50) NULL,
ContactType nvarchar(50) NULL
);...RETURN;
END;
2.
The following SQL can be used to report from the function:
SELECT
ContactID, FirstName, LastName, JobTitle, ContactType
FROM dbo.ufnGetContactInformation(5)
It needs to be saved to .SQL file.
Note:
- no semicolon at the end;
- parameter @ContactID INT is temporarily used with hard-coded
value 5, which will be substituted with parameter in the next
steps
3.
Create synonym for External SQL Script above and add Variable
definition (VARIABLE NAME=&&CONTACTID) to the synonym:
FILENAME=UFNGETCINFO, SUFFIX=SQLMSS , $
VARIABLE NAME=&&CONTACTID,DEFAULT=1,$
SEGMENT=UFNGETCINFO, SEGTYPE=S0, $
FIELDNAME=CONTACTID, ALIAS=ContactID, USAGE=I11, ACTUAL=I4, $
FIELDNAME=FIRSTNAME, ALIAS=FirstName, USAGE=A50V, ACTUAL=A50V,
MISSING=ON, $
FIELDNAME=LASTNAME, ALIAS=LastName, USAGE=A50V, ACTUAL=A50V,
MISSING=ON, $
FIELDNAME=JOBTITLE, ALIAS=JobTitle, USAGE=A50V, ACTUAL=A50V,
MISSING=ON, $
FIELDNAME=CONTACTTYPE, ALIAS=ContactType, USAGE=A50V,
ACTUAL=A50V,
MISSING=ON, $
4.
Add Variable to SQL Script FROM-clause
dbo.ufnGetContactInformation(&&CONTACTID) and use TABLE to
produce a report:
-* using non-default parameter value, e.g. 5:
-SET &&CONTACTID = 5;
TABLE FILE UFNGETCINFO
PRINT *
END
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015