Erin Trotter Posted November 8 Posted November 8 (edited) Good afternoon everyone. I have been creating drilldown links for some time and I know how to create a link to export to excel and make it appear in the header of the report, but I'm just wondering if there is a way on a fex to create a button instead that says Export to Excel and have it display in the heading section of a report. By the way, I'm using 9.3.1 Edited November 8 by Erin Trotter
David Beagan Posted November 8 Posted November 8 I have done something like this excel_button.fex -DEFAULTH &WFFMT = 'HTML'; -SET &suppress_excel = IF &WFFMT EQ 'HTML' OR 'AHTML' THEN ' ' ELSE 'FOC_NONE'; TABLE FILE GGSALES "&|#10062; Excel &suppress_excel" SUM UNITS DOLLARS BY REGION BY ST BY CITY ON TABLE SET PAGE NOLEAD ON TABLE PCHOLD FORMAT &WFFMT ON TABLE SET STYLE * TYPE=REPORT, PAGECOLOR=RGB(242 242 242), SIZE=10, $ TYPE=TITLE, BACKCOLOR=RGB(230 230 230), $ TYPE=DATA, BACKCOLOR=(RGB(242 242 242) WHITE), BORDER-LEFT=LIGHT, BORDER-LEFT-COLOR=RGB(230 230 230), BORDER-RIGHT=LIGHT, BORDER-RIGHT-COLOR=RGB(230 230 230), $ TYPE=HEADING, justify=right,style=-underline, hyperlink-color=grey, FOCEXEC=./excel_button.fex(WFFMT='XLSX'),$ ENDSTYLE END Kinda looks like a button, just using a Unicode character. Note that the FOCEXEC drilldown uses a relative path to call itself, passing the XLSX format.
Erin Trotter Posted November 8 Author Posted November 8 That's very creative. I never thought of using a unicode character. I think that would work too. Thank you for this!
David Beagan Posted November 8 Posted November 8 Or to make it look a little more botton-like. -DEFAULTH &WFFMT = 'HTML'; -SET &suppress_excel = IF &WFFMT EQ 'HTML' OR 'AHTML' THEN ' ' ELSE 'FOC_NONE'; TABLE FILE GGSALES "<+0> &|nbsp; &|#10062; Excel &|nbsp;<+0> &suppress_excel" SUM UNITS DOLLARS BY REGION BY ST BY CITY ON TABLE SET PAGE NOLEAD ON TABLE PCHOLD FORMAT &WFFMT ON TABLE SET STYLE * TYPE=REPORT, PAGECOLOR=RGB(242 242 242), SIZE=10, $ TYPE=TITLE, BACKCOLOR=RGB(230 230 230), $ TYPE=DATA, BACKCOLOR=(RGB(242 242 242) WHITE), BORDER-LEFT=LIGHT, BORDER-LEFT-COLOR=RGB(230 230 230), BORDER-RIGHT=LIGHT, BORDER-RIGHT-COLOR=RGB(230 230 230), $ TYPE=HEADING, ITEM=1, JUSTIFY=RIGHT,STYLE=-UNDERLINE, HYPERLINK-COLOR=GREY, BACKCOLOR=RGB(220 220 220), TOPGAP=.05, BOTTOMGAP=.05, FOCEXEC=./excel_button2.fex(WFFMT='XLSX'),$ ENDSTYLE END 2
Solution Martin Yergeau Posted November 11 Solution Posted November 11 (edited) Or to use an image -DEFAULTH &PARAM1 = _FOC_NULL -SET &WFFMT = 'HTML'; -SET &#ASPDF_L = IF &LANG EQ 'EN' THEN 'Save as PDF' ELSE 'Sauvegarde en PDF'; -SET &#ASEXL_L = IF &LANG EQ 'EN' THEN 'Save as Excel' ELSE 'Sauvegarde en Excel'; DEFINE FILE CAR EXL_EXPRT /A150 = '<IMG SRC="/ibi_apps/run/ibfs?IBFS_path=EDA/EDASERVE/logo_img/excel_small.gif" style="border-style: none;" alt="&#ASEXL_L.EVAL">'; PDF_EXPRT /A150 = '<IMG SRC="/ibi_apps/run/ibfs?IBFS_path=EDA/EDASERVE/logo_img/pdf_small.gif" style="border-style: none;" alt="&#ASPDF_L.EVAL">'; END TABLE FILE CAR SUM SEATS EXL_EXPRT NOPRINT PDF_EXPRT NOPRINT BY COUNTRY BY MODEL HEADING "<EXL_EXPRT <PDF_EXPRT" ON TABLE PCHOLD FORMAT &WFFMT ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL -IF &WFFMT NE 'XLSX' OR 'AHTML' THEN GOTO NOBYDSP; ON TABLE SET BYDISPLAY ON -NOBYDSP ON TABLE SET LINES 999999 ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ TYPE=HEADING, JUSTIFY=LEFT, $ -IF &WFFMT NE 'HTML' THEN GOTO NOSAVE; TYPE=HEADING, OBJECT=FIELD, ITEM=1, FOCEXEC=IBFS:/WFC/Repository/YourFexName.fex ( \ PARAM1=&PARAM1.QUOTEDSTRING \ WFFMT='XLSX'), TARGET='_blank', $ TYPE=HEADING, OBJECT=FIELD, ITEM=2, FOCEXEC=IBFS:/WFC/Repository/YourFexName.fex ( \ PARAM1=&PARAM1.QUOTEDSTRING \ WFFMT='PDF'), TARGET='_blank', $ -NOSAVE ENDSTYLE END -RUN Edited November 11 by Martin Yergeau 2 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now