Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Exposing a Custom User Defined Function to IA 8105
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Exposing a Custom User Defined Function to IA 8105
 Login/Join
 
Platinum Member
posted
I need to know exactly where to store a custom user function for it to be exposed to InfoAssist in 8105. I want to be able to access it within InfoAssist when building a report or chart. Can this be done for 8105? I know it can be done for 8201. Any ideas, please let me know.

This message has been edited. Last edited by: FP Mod Chuck,


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
The DEFINE FUNCTION code must be executed prior to IA GUI being rendered, so you could achieve this by using a reporting obect or executing a procedure within the server or site profiles.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5661 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Master
posted Hide Post
Or you can also add Define fields to the master file.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks for the replies. So if I use a DEFINE FUNCTION that takes an input parameter from a report in IA, where should the function procedure specifically live on the server for 8105?

Also, shouldn't there possibly be a comment at the top of the DEFINE FUNCTION procedure to expose it to IA....where I can chose that function when setting up a DEFINE?


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
where should the function procedure specifically live on the server for 8105?

Because this implies that you would execute it via a server or site profile. This being the case then I would suggest somewhere in an Application folder.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5661 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
possibly be a comment at the top of the DEFINE FUNCTION procedure to expose it to IA

Not expressly, but you can add DESCRIPTION syntax to the function and each parameter that will aid the IA+ consumer in understanding what is expected of them as far as input goes.

I tend to utilise the DESCRIPTION to add information as regards format of the parameter etc.

I use the DESCRIPTION syntax for the function itself to provide a brief description of what the function achieves, including the format of the output value.

When you IA+ user selects a function with this information, the function DESCRIPTION will be displayed within the main dialog. Each parameter DESCRIPTION will be displayed within the dialog when that parameter is clicked or focused ready for input.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5661 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Tony A - I believe there is something else that needs to be done for you to be able to see the function as a User Defined function under all of the other inherent function when opening the DEFINE window in IA. I kind of remember this in 8201 when I was working on it. I am using 8105 now, and so, I am using IA and not IA+.


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
You shouldn't need to do more than add it in the server or site profile. I have a library of functions that produce all sorts of inline visualisations that I expose this way.

When I bring up IA (or IA+) and create a new define or compute, I then click on the functions button and then choose user functions from the list of "folders". All of my functions are exposed there.

The dialog between 8.1.05 and 8.2.01 is different but the underlying process is the same.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5661 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Just remembered that the big difference between App Studio and IA dialog is that the description text is shown in the dialog within App Studio, but only on hover within the function list in IA.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5661 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Tony A - I just tried putting a test function in a couple of different applications folders on the server and I can not see it exposed to IA. There is nothing in the User Functions folder. What am I missing?


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
You shouldn't need to do more than add it in the server or site profile

Did you add an -INCLUDE within one of these profiles?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5661 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I just added my DEFINE FUNCTION essentially as a FEX file out there to the application folder. I did not add a -INCLUDE anywhere.


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
add it in the server or site profile

Then the above is your solution.

Just adding it to an Application folder will not execute it but it could (depending upon settings such as APP PATH) make it available for execution, so you need to make sure that the execution is achieved when required.

If you do not mind potential overheads then server or site profile inclusion may suit your needs.

If your functions are specific and limited to a select few procedures, then it may be a suggestion to put them in the preprocessing portion of a reporting object instead and have your IA users build their procedure from that - the call is yours.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5661 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
So you're saying include it in the server profile fex?


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
If I need to put it in the server profile, I can probably do that. However, shouldn't the DEFINE FUNCTION be able to live in an application folder on the reporting server, and there should be some way to expose it to IA?


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Tony A - Can you provide specifically where your user define functions sit on the reporting server so they can be exposed to IA?


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
I place them within a focexec which lives in an App folder named "Utilities". To get the Functions within memory (and thereby available for selection within the GUI - whether that is App Studio or IA) I execute that focexec by an -INCLUDE placed within the site profile.

Just placing them in a focexec within an App folder that lies within the APP PATH doesn't get them into memory.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5661 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Ok, where exactly is the site profile fex located on the reporting server again?


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Also, I want this function to be able to take in an input parameter from a report from InfoAssist. Conceptually, we should be able to do this. Also, where is the server profile fex located specifically? Let me know your thoughts Tony A.


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
AMC

The server profile can be located in any application folder on the reporting server. From the client administration console you navigate to configuration / client settings / general and for the _site_profile setting you put -INCLUDE appfolder/siteprofile.fex where appfolder is the folder you put the fex in and siteprofile is the name of the fex. You will need a -DEFAULTH for the parameter being passed in so it doesn't fail when no parameter is passed to it.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1810 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Chuck Wolff - Thanks for your reply. So when I included that in the _site_profile setting, I got the "unrecoverable" error message when trying to create a new report in InfoAssist. As soon as I cleared out the _site_profile setting, I was back able to create new reports.


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
AMC

Post the code you have in that fex so we can hopefully find the error.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1810 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Chuck Wolff - I figured it out. I forgot to add the -DEFAULTH back in. That's what was forcing the error message. I added it back in and I can now create a report. I can also now see my function within the user defined section of functions when creating a Define.

This is what I wanted to test. Thanks for your help.


WF 8.1.05
Windows
SQL Server 2014
HTML, PDF, EXCEL
 
Posts: 175 | Registered: March 24, 2017Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Exposing a Custom User Defined Function to IA 8105

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.