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] Execute a Library Report within a FEX

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Execute a Library Report within a FEX
 Login/Join
 
Silver Member
posted
Good Morning,

7.7.03 version

Do we have the ability to execute a saved Library report within a MRE Fex?

For Example, executing a FEX using the INCLUDE:
-INCLUDE mydomain/app/my_report.fex

Can we do something like this: where my_saved_report is in the library.
-SOME COMMAND my_saved_report.fex

I am aware of the functionality exists with the combination of HTML/iFrame, but I am looking specifically in calling it within a fex.

thank you for your time.

Nick

This message has been edited. Last edited by: Kerry,
 
Posts: 37 | Registered: January 11, 2008Report This Post
Gold member
posted Hide Post
Hi Nick,

could you please be more specific what you mean by "executing a saved library report".

I guess you mean the following:

You have lets say a HTML report stored as a BLOP in the report library, and you would now like to include this one into the fex'es output? Is that right?

For the a.m. task I could up with one solution which would should work with text data reports (like HTML).

If you know some ID of the report in the library a-priori (which I guess you do, you could not include it otherwise) - you could extract the blob from the report library db into the a alpha hold file (in WF TEMPDIR) and then just include it using

 
-HTMLFORM BEGIN
!IBI.FIL.MYHOLD;
-HTMLFORM END


Have not tried this myself but I believe it should work.

However, for binary files (like PDFs or Excels) this solution is likely not to work. You might need to use external software here to "embed" a library's report.

Cheers Linne


WebFOCUS 7.7.03
 
Posts: 67 | Registered: January 05, 2011Report This Post
Silver Member
posted Hide Post
Thank you for your help...

quote:
could you please be more specific what you mean by "executing a saved library report".

I would like to retrieve the report from the library, and display to the user.


quote:
you could extract the blob from the report library db into the a alpha hold file (in WF TEMPDIR) and then just include it using

That is a very interesting idea. Any idea how to extract the BLOB from the database? For instance which synonym file to I connect to?

With this information I will also continue my research.

Thanks again.
 
Posts: 37 | Registered: January 11, 2008Report This Post
Silver Member
posted Hide Post
Looks like I need to try sql pass thru to retrieve it.

I will give that a shot.
 
Posts: 37 | Registered: January 11, 2008Report This Post
Silver Member
posted Hide Post
I am not having any luck extracting the report from the blob...any tips?
 
Posts: 37 | Registered: January 11, 2008Report This Post
Gold member
posted Hide Post
Hi Nick,

at what point do you currently stuck.

Is it the actual selection of a blob or the problem of getting a join / select etc. inside the RCaster databases.

Could you also tell us on which platform you wfocus database runs on. Ora, MS-Sql?

Hopefully, we can find a solution then.

Linne


WebFOCUS 7.7.03
 
Posts: 67 | Registered: January 05, 2011Report This Post
Gold member
posted Hide Post
Hi again,

I tried something and this might be able to help you:

I am using an ORA 11g Database with a test table containing a blob column called bdata (one row only)

WebFOCUS code:
ENGINE SQLORA SET DEFAULT_CONNECTION MyDB
SQL SQLORA
 select btoc(bdata) "mytext" from TEST_BLOB_LOAD;
TABLE FILE SQLOUT
PRINT 
     mytext
ON TABLE HOLD AS HTMP FORMAT ALPHA
END
-RUN
-HTMLFORM BEGIN
!IBI.FIL.HTMP;
-HTMLFORM END


You also require the conversion function from BLOB to CLOB (I called BTOC):

found here

  
create or replace function BTOC(B BLOB) 
return clob is 
  c clob;
  n number;
begin 
  if (b is null) then 
    return null;
  end if;
  if (length(b)=0) then
    return empty_clob(); 
  end if;
  dbms_lob.createtemporary(c,true);
  n:=1;
  while (n+32767<=length(b)) loop
    dbms_lob.writeappend(c,32767,utl_raw.cast_to_varchar2(dbms_lob.substr(b,32767,n)));
    n:=n+32767;
  end loop;
  dbms_lob.writeappend(c,length(b)-n+1,utl_raw.cast_to_varchar2(dbms_lob.substr(b,length(b)-n+1,n)));
  return c;
end;
/


My result was the HTML page contained in the BLOB. Unfortunately I also got 2 extra undesired characters at the end of the page - I do not yet know where they come from.

Yet I hope this helps.

Linne


WebFOCUS 7.7.03
 
Posts: 67 | Registered: January 05, 2011Report This Post
Silver Member
posted Hide Post
Linne, thank you very much for the very detailed example. I bet it will help many people including myself.

thank you again.
 
Posts: 37 | Registered: January 11, 2008Report 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] Execute a Library Report within a FEX

Copyright © 1996-2020 Information Builders