Iam trying to rename the Excel having the extension xlsx using the &RPTSTMP variable but when Iam trying to execute the report,it is getting opened in WFServlet.zip format but if I give as: ON TABLE PCHOLD FORMAT EXL07 FORMAT AS 'Report_name' ,(some static name) I get the report in xlsx format but I want to rename the xlsx dynamically (using &RPTSTMP or any other such variable).
-SET &REPORT ='Car_report';
-SET &RPTSTMP = &REPORT || '_' || &TOD;
-TYPE RPT is &RPTSTMP
TABLE FILE CAR
PRINT CAR COUNTRY SALES
ON TABLE PCHOLD FORMAT EXL07 FORMAT AS '&RPTSTMP'
ON TABLE SET HTMLENCODE ON
ON TABLE SET STYLE *
TYPE=REPORT,FONT='ARIAL',SIZE=8,GRID=ON,BORDER=1,$
TYPE=TITLE,FONT='ARIAL',SIZE=8,STYLE=BOLD,COLOR='BLACK',JUSTIFY=CENTER,BORDER=1,BACKCOLOR=RGB(169 169 169),$
TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,BORDER=1,JUSTIFY=LEFT,$
END
-RUN
-EXIT
Please let me know how to get this done.Thanks a lot in advance!
Thanks&Regards, IPThis message has been edited. Last edited by: info4pal,
The problem is &TOD value. hours, mins & seconds values are separated by "." . If you replace the "." with "_" then you may get the Excel file name.This message has been edited. Last edited by: Maran,
Info4pal, you need to adjust your redirection setting for that file type. I believe it needs to be set to "save" for that file type to save to the server first.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
January 30, 2017, 07:42 AM
info4pal
Hi All,
Maran's tips worked and thanks everyone also But actually I have a drilldown report and once I click on the hyperlink, the renaming of the sheet works fine but again if I click on the same hyperlink, it gives me this pop up message saying :
A document with the name 'car_report_06_37_49.xlsx' is already open.You cannot open two documents with the same name,even if the documents are in different folders. To open the second document,either close the document that's currentky open,or rename one of the documents.
My end users do not wish to see this message if they click on the same hyperlink.
Is there any workaround for not showing up this message? Please let me know.
TABLE FILE CAR PRINT CAR COUNTRY SALES ON TABLE PCHOLD AS '&RPTSTMP' FORMAT EXL07 ON TABLE SET HTMLENCODE ON ON TABLE SET STYLE * TYPE=REPORT,FONT='ARIAL',SIZE=8,GRID=ON,BORDER=1,$ TYPE=TITLE,FONT='ARIAL',SIZE=8,STYLE=BOLD,COLOR='BLACK',JUSTIFY=CENTER,BORDER=1,BACKCOLOR=RGB(169 169 169),$ TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,BORDER=1,JUSTIFY=LEFT,$ END -RUN -EXIT
Thanks! @vi
WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
January 30, 2017, 01:11 PM
Doug
OR:
-SET &HHMMSS = EDIT(&TOD,'99$99$99');
... TABLE FILE...
ON TABLE PCHOLD AS 'Car_Report_&YYMD.EVAL_&HHMMSS' FORMAT EXL07
... END
"HHMMSS" is so useful...
January 30, 2017, 11:40 PM
Maran
IP,
Are you generating excel output in drill down fex...? If you want the current time values in excel name when you click the hyperlink..the &RPTSTMP variable should be refreshed to fetch the current time in the &TOD variable.
If you generate the &RPTSTMP variable in drill down fex..you will get the current time values in excel filename when you click the hyperlink.
Can you share your code via CAR sample file. Means both fexs - Main report and drill down report. Just wanted to see that what you are trying to achieve.
Below are the sample code and i clicked multiple time and it allowed me to open multiple excel file.
-*==============Main Report========================= TABLE FILE CAR SUM SALARY BY CAR 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/endeflt.sty, $ TYPE=DATA, COLUMN=N1, FOCEXEC=IBFS:/WFC/Repository/Public/DrillDownReport.fex, TARGET='_self', $ ENDSTYLE END
TABLE FILE CAR SUM SALARY BY CAR ON TABLE PCHOLD AS '&RPTSTMP' FORMAT EXL07 ON TABLE SET HTMLENCODE ON ON TABLE SET STYLE * TYPE=REPORT,FONT='ARIAL',SIZE=8,GRID=ON,BORDER=1,$ TYPE=TITLE,FONT='ARIAL',SIZE=8,STYLE=BOLD,COLOR='BLACK',JUSTIFY=CENTER,BORDER=1,BACKCOLOR=RGB(169 169 169),$ TYPE=DATA,FONT='ARIAL',SIZE=8,STYLE=NORMAL,BORDER=1,JUSTIFY=LEFT,$ END -RUN -EXIT
I am hoping that it will solve your problem.
Thanks! @vi
WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs