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     Call Javascript in PDF

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Call Javascript in PDF
 Login/Join
 
Master
posted
Hi,
I'm trying to call a report using Javascript. It should work in all 3 formats (HTML, PDF and Excel). The reason I'm using Javascript is to hide menu, toolbar in the new window.
We can achieve this in HTML but not working in PDF and Excel. Anybody can suggest me the way to achieve this.

Thanks


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Expert
posted Hide Post
Kamesh, the format of the report shouldn't matter. You're using JavaScript to open a new window and then run the report in that window.

What's not working?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
This is the sample code I'm trying

TABLE FILE CAR
PRINT CAR
MODEL
BODYTYPE
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=P1,JAVASCRIPT=GETREPORT(),$
ENDSTYLE
END
-RUN


-HTMLFORM BEGIN


<script language="JavaScript">
function GETREPORT()
{
var shttp='http://crsdev/ibi_apps/WFServlet?IBIF_ex=test.fex';
window.open(shttp,"test");
}



-HTMLFORM END
-EXIT

This code works for html but when I try this for PDF, getting "Page Cannot be displayed"


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Expert
posted Hide Post
You have a drilldown from one report to another.

If your main report is in a window without the menu toolbar, then when you drilldown you won't have the toolbar - you can use FOCEXEC instead of JAVASCRIPT.

If the main report is in a window with the menu toolbar and you want the drilldown to open in a new window without the menu toolbar, may I suggest coding the drilldown based on the selected output format?

Something like this:

ON TABLE SET STYLE *
TYPE=DATA, COLUMN=P1,FOCEXEC=TEST, WHEN='&OUTPUT' EQ 'PDF, $
TYPE=DATA, COLUMN=P1,JAVASCRIPT=GETREPORT(), WHEN '&OUTPUT' EQ 'HTML', $
ENDSTYLE

I hope this is of some help.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
It gives me the same result for PDF. Not opening in new window and also not hiding the menu and toolbar.
My main window will have menubar.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Master
posted Hide Post
Use javascript to open up a new window with the options you want, then submit the form with the new window as the target.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Master
posted Hide Post
Not able to call Javascript in PDF report. That's my problem.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Expert
posted Hide Post
Kamesh,

You have a report with a drilldown that will be run in three different formats. The main report is in a window with the menu toolbar. You want the drilldown report to open in a window without the menu toolbar. This won't work for PDF and probably not for Excel.

Why don't you open the main report in a window without the menu toolbar and than have the drilldown report open in the same window?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     Call Javascript in PDF

Copyright © 1996-2020 Information Builders