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] Adding a Print Button to a Page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Adding a Print Button to a Page
 Login/Join
 
Member
posted
Is there a way to add a Print button to a container's toolbar options in Page Designer?

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


Application Edition
SQL Server
 
Posts: 14 | Registered: June 13, 2017Report This Post
Virtuoso
posted Hide Post
Assuming you're on 8.2xx, yes, you can use JS and CSS to add functions like print, email et cetera. I don't have sample code but someone out there might have it.

There's helpful doc here:
..\config\web_resource\doc\automation\index.html

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


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
Try adding this for starters:
<input type="button" value="Print this page" onClick="window.print()">
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
This might be an overkill but, here's what I did for my page, you add a class (custom1) to a panel (myPanel) and reference the class in JS as shown below and add icons using font awesome icons (fa fa-exl) you can look up for other icons if you like, and finally you add an event listener.
 
window.addEventListener("iba_pageloading", function (e){
    var page = e.data;
    var myPanel = document.querySelector(".custom1").ibaObject;
    var ibsite = myPanel.addButton({"glyphClasses": "fa fa-question", "class": "ibButton", "tooltip": "Help using this application"}, ".pd-container-title-button-resize", true);
    var btnExl = myPanel.addButton({"glyphClasses": "fa fa-file-excel-o", "class": "ibButton", "tooltip": "Excel Dowload"}, ".pd-container-title-button-resize", true);
    var btnPDF  = myPanel.addButton({"glyphClasses": "fa fa-file-pdf-o", "class": "ibButton", "tooltip": "PDF Download"}, ".pd-container-title-button-resize", true);
    var btnPrint  = atmPanel.addButton({"glyphClasses": "fa fa-print", "class": "ibButton", "tooltip": "Print"}, ".pd-container-title-button-resize", true);
    ibsite.addEventListener("click", function(){
        window.open("http://www.ibi.com");
    });
    btnPrint.addEventListener("click", function(){
        window.Print();
    });
    

    page.element().addEventListener("iba_beforecontentload", function (e){
        var loadInfo = e.data;
        var path = loadInfo.path; // The path to the content being described
        var defaultValues = loadInfo.defaultValues; // If default values are used to run the content
        // e.preventDefault() will stop the page from retrieving the content
        
        // use a try/catch block, to avoid errors
        try {
            // sortvaldd is the class name of my dropdown list
            var zipcode = document.querySelector(".zip").children[0].children[1].children[0];
            // tabcont1 is the class name of my dropdown 
            var zip = zipcode.value;
            var url = '../ibi_apps/wfirs/ibfs/WFC/Repository/COE/USB_Locations/USB_Branch_Report.fex'  ;
            url = url + '?ZIPCODE=' + zip ;
            exl.addEventListener("click", function(){
            url = url + '&FMT=XLSX' ;
            window.open(url) ;
            });
            atmPDF.addEventListener("click", function(){
            var r = Math.random();
            urlPDF = '../ibi_apps/wfirs/ibfs/WFC/Repository/COE/USB_Locations/USB_ATM_Report.fex' ;
            urlPDF = urlPDF + '&FMT=PDF' + '&r=' + r;
            window.open(urlPDF) ;
            });
            
        }
        catch(err) {
          // do nothing
        }
    });
});
 


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Member
posted Hide Post
i want to go back to teast 1 fex how can be this is possible
-DEFAULT &HEADING1 = 'TEST 1' ;
-SET &A = IF &HEADING1 EQ 'TEST 1' THEN '' ELSE '-*' ;
TABLE FILE CAR1
SUM
SALES
BY COUNTRY
BY CAR
&A BY MODEL
HEADING
" &HEADING1"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
TYPE=HEADING,
FOCEXEC=IBFS:/WFC/Repository/projecttraining/clickingoutputs_heading.fex( \
HEADING1='TEST 2' \
),
TARGET='_self',
$
ENDSTYLE
END

any idea ?


atul
 
Posts: 3 | Registered: February 06, 2020Report This Post
Virtuoso
posted Hide Post
Not 100% sure to understand your request but once you drilled to the child report (TEST 2), since you open it in same window as TEST 1 (TARGET='_self'), just press the backspace key on your keyboard or the back arrow on the browser


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
How about this?
<form> <input type="button" value="Return to previous page" onClick="javascript:history.go(-1)" /> </form>
With or without the form tags.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
I believe this was for the new "WebFOCUS Page Designer" Panels


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report 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] Adding a Print Button to a Page

Copyright © 1996-2020 Information Builders