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     print 4 different reports as one job

Read-Only Read-Only Topic
Go
Search
Notify
Tools
print 4 different reports as one job
 Login/Join
 
Member
posted
I have 4 differnt reports (iframes) in the HTML layout and I need to print the entire 4 reports as one print job. I tried copying the 4 reports to one iframe to print but the printed output said "No Query information to decode" even though I could see the report information in the iframe. Can someone please help me (a newbie to WebFocus) figure out how this can be done? Below is one version of javascript code that I thought should work but doesn't:

function button1_onclick(ctrl) {
var printHtml='';
printHtml += document.report1.document.body.innerHTML;
printHtml += document.report2.document.body.innerHTML;
printHtml += document.report3.document.body.innerHTML;
printHtml += document.report4.document.body.innerHTML;
printHtml += '';

document.report1.open();
document.report1.write(printHtml);
document.report1.close();

document.report1.focus();
document.report1.print();
}


WebFocus Version = 7.1.4
OS.Platform = Windows XP 5.1
Expected OUtput = HTML, Excel and PDF
 
Posts: 13 | Registered: July 23, 2007Report This Post
Virtuoso
posted Hide Post
I'm not much for Javascript, but is the function you included part of the larger HTML page that would know about each separate frame or is it within one of the frames? I don't know if you can reference the content of the other frames within the function tied inside of on of the frames (but could easily be mistaken).
If nothing else you could add a link to a fex which would -INCLUDE all of the procedures and run them consecutively into the same frame.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
I created 4 seperate fex files using report painter. I then used HTML Layout Painter to create the layout, which displays each report on the screen in quadrant-fashion. The Javascript comes into play because when I try to add an "on click" event handler, the HTML Layout painter dumps me into the Javascript portion of the HTML code. The HTML code does have reference to all 4 reports and if I merely set the focus [i.e., document.report1.focus()] to the specific report and then request print [i.e. document.report1.print()] I can get each report to print. The problem is that using this "focus-print" method for each report causes the print pop-up window (the one that asks for what printer, how many pages, etc.) to appear 4 times. My users only want to see the print pop-up window once.


WebFocus Version = 7.1.4
OS.Platform = Windows XP 5.1
Expected OUtput = HTML, Excel and PDF
 
Posts: 13 | Registered: July 23, 2007Report This Post
Expert
posted Hide Post
What you're asking for and doing in the JavaScript is far from normal WebFOCUS programming.

Have you tried the web browser Print button? How does it behave?


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
Member
posted Hide Post
I've tried the web browser print menu item, the print button and the javascript command of window.print(). For each method, the only thing that gets printed is what is visible on the screen. Each of the 4 reports has at least 2 pages of info, so the majority of each report does not get printed using the browser print capabilities.


WebFocus Version = 7.1.4
OS.Platform = Windows XP 5.1
Expected OUtput = HTML, Excel and PDF
 
Posts: 13 | Registered: July 23, 2007Report This Post
Expert
posted Hide Post
Then you're not going to be able to print all four quadrants in one shot - it's just not proper web browser behaviour and has nothing to do with WebFOCUS. You have the choice of creating one HTML page with all four reports within in it, one report in each of four TD cells within an HTML TABLE, or using DHTML DIV if you want to get more sophisticated.

Cheers.


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
Member
posted Hide Post
Okay...I figured it out (only took all day!!!) The following code combines all the text from the 4 reports and writes it to a new browser window. The user can now use the browser print capabilities to print out the data. Thanks all for your help!!

function button1_onclick(ctrl) {
var printHtml='';
printHtml += document.report1.document.body.innerHTML;
printHtml += document.report2.document.body.innerHTML;
printHtml += document.report3.document.body.innerHTML;
printHtml += document.report4.document.body.innerHTML;
printHtml += '';

var printerWindow = window.open("about:blank");
printerWindow.document.write(printHtml);
}


WebFocus Version = 7.1.4
OS.Platform = Windows XP 5.1
Expected OUtput = HTML, Excel and PDF
 
Posts: 13 | Registered: July 23, 2007Report This Post
Expert
posted Hide Post
Pat,

That's very interesting. Thanks for the DHTML JS code.

Cheers.


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     print 4 different reports as one job

Copyright © 1996-2020 Information Builders