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]Create Report with Synonym(stored procedure)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Create Report with Synonym(stored procedure)
 Login/Join
 
Gold member
posted
when i create new synonym with stored procedure

the stored procedure have parameter.

the created synonym like this:

SP_GET_USER.mas

INPUT:@id ,@name ...
OUTPUT:@RETURN_VALUE
ANSWERSET1:USEER_KEY,USEER_NAME.....


when i create report in fex file.


TABLE FILE SP_GET_USER
PRINT
'SP_GET_USER.ANSWERSET1.USEER_KEY'
'SP_GET_USER.ANSWERSET1.USEER_NAME'
HEADING
""
FOOTING
""
.................
.................


when i run the fex , i get the message :

(FOC1400) SQLCODE IS 201 (HEX: 000000C9) XOPEN: 42000
: Microsoft SQL Native Client: [42000] Procedure or function 'PS_WF_Custom
: erDropDownDates' expects parameter '@id , which was not supp
: lied.
L (FOC1406) SQL OPEN CURSOR ERROR.


i think the issue with the parameters(@id,@name...).

but i don't know how to supply the @id to fex file.

i try to
-DEFAULT @id=2;
-DEFAULT @name='test';
...........

but it's not work...

i read the document , i think i didn't find the correct way or ensample to do.


Thanks,
Yang

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


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Master
posted Hide Post
Try this

-DEFAULT &id=2;
-DEFAULT &name='test';
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
<JG>
posted
quote:
-DEFAULT &id=2;
-DEFAULT &name='test';

that will set defaults

What is required in the procedure

is WHERE ID EQ '&id' and WHERE TEST EQ '&test'
 
Report This Post
Gold member
posted Hide Post
thanks Ram Prasad E
thanks JG

i'm did that ... but i not work ...

i found ohter problem ..
i can't find the "New Parameters Dialog Box"
like online help
http://documentation.informati...x.htm?url=layout.htm


the @id ,@name.... are required with procedure

Thanks,
James Yang


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Master
posted Hide Post
jgelona, are you refering the below thread.

http://forums.informationbuild...71057331/m/276101293

This message has been edited. Last edited by: Ram Prasad E,
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
<JG>
posted
James not sure which tool you are using but change
-DEFAULT to -DEFAULTS
 
Report This Post
Virtuoso
posted Hide Post
quote:
change -DEFAULT to -DEFAULTS


That may not be necessary. I rarely (if ever) use -DEFAULTS. They are synonyms anyway and for whatever reason -DEFAULT just looks "neater" to me Wink

From documentation:

quote:

-DEFAULT commands set default values for local or global variables. Supplying default values to variables in a stored procedure helps ensure that it runs correctly.

Note that -DEFAULTS is a synonym for -DEFAULT



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
<JG>
posted
The problem is that the tools that you use to generate screens and prompts
prefer -DEFAULTS and -DEFAULTH

S meaning seen H meaning HIDDEN

or Prompt Do not Prompt.
 
Report This Post
Virtuoso
posted Hide Post
I stand corrected, JG !

As I don't use any particular tool other than Dev. Studio's text editor and sometimes Unix's vi to directly edit .fex files the use of -DEFAULT has proven to be quite effective. As far as HTML launch pages are concerned, we still use and maintain our own old ASP-based reporting application with calls to server-based .fex procedures made through the WFServlet so we don't really use the HTML Layout painter or any of the other tools that came packed with Dev.Studio.

Here's me hoping that one day we'll upgrade our WF 5.3.4 environment to 7.6.x (or 8.x? ) so we can take advantage of the new functionality and tools but 'til then ... text editor it is.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
thanks Ram Prasad E
thanks njsden

thanks JG
i'm use version 7.6.8 .

hi jgelona,
i'm glad that you saw my qustion.


i try to
-DEFAULT &id=2;
-DEFAULT &name='test';

and

-DEFAULTS &id=2;
-DEFAULTS &name='test';

and

-DEFAULTS SP_GET_USER.INPUT.@id=2;
-DEFAULTS SP_GET_USER.INPUT.@name='A';

.. but it not work ....

thanks all , i will try other way.

Thanks,
James Yang

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


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Master
posted Hide Post
To pass input parameter values to stored procedure, here is a snippet.

-SET &id=2;
-SET &name='''test''';

SQL SQLMSS
EXECUTE SP_GET_USER &id &name
;
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Gold member
posted Hide Post
Thanks Ram Prasad E

by the way , i used [synonym]

SP_GET_USER.mas

INPUT:@id ,@name ...
OUTPUT:@RETURN_VALUE
ANSWERSET1:USEER_KEY,USEER_NAME.....


use -set ... not work.

Thanks,
James Yang


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Gold member
posted Hide Post
can anybody help me on this ?

create report with synonym.mas(need parameter @id,@name....)


my step:
1.create synonym ,Restrict object type to :Stored Procedures ,select a stored Procedures and input @id,@name... subimt create synonym ,SP_GET_USER.mas it's ok.

2. in the test.fex , i create a report , select
SP_GET_USER.mas and dragging ANSWERSET1.USEER_KEY and ANSWERSET1.USEER_NAME to report , and run it :
i got the error:
(FOC1400) SQLCODE IS 201 (HEX: 000000C9) XOPEN: 42000
: Microsoft SQL Native Client: [42000] Procedure or function SP_GET_USER
: erDropDownDates' expects parameter '@id , which was not supp
: lied.
L (FOC1406) SQL OPEN CURSOR ERROR.

how can i pass the parameters to report or synonym ?

Thanks,
James Yang

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


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Silver Member
posted Hide Post
You need to pass the parameter with IF:

TABLE FILE SP_GET_USER
PRINT whatever you need
IF @ID EQ 1
IF @NAME IS MISSING
END

regards,
Markus


WF 7.6.6 (MRE,BID, DevStudio, partly RC) on Windows 2003 /Apache/Tomcat
Output: HTML,Excel,PDF,PPT
Adapters: SQL Server, DB2, Oracle
 
Posts: 38 | Location: Austria, Linz | Registered: June 19, 2009Report This Post
Gold member
posted Hide Post
thanks Computix ,

i'm try it , but i also error with @id,@name.....

i will check it with your idea again.

Thanks,
James Yang


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Gold member
posted Hide Post
quote:
Computix


hi computix,

i try to :

TABLE FILE SP_GET_USER
PRINT whatever you need
WHERE (SP_GET_USER.INPUT.@ID EQ 1 )
AND (SP_GET_USER.INPUT.@NAME EQ 'TEST')
AND....
END

or...

TABLE FILE SP_GET_USER
PRINT whatever you need
WHERE (@ID EQ 1 )
AND (@NAME EQ 'TEST')
AND....
END

i get the error :

0 ERROR AT OR NEAR LINE 30 IN PROCEDURE test1 FOCEXEC *
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED:
SP_GET_USER.INPUT.@id
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT


something wrong with that ?

Thanks,
James Yang


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Gold member
posted Hide Post
Thanks all

i found the issue ,

i just changed @ID to @id ...

it's work.

Thamks,
James Yang


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report 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]Create Report with Synonym(stored procedure)

Copyright © 1996-2020 Information Builders