[CLOSED] chaning the file name dinamically in RC, appeding todays date to filename
I am trying different options , if guys any other ideas
I have a by field by default the out file name changes according to the BY field but I want to append the todays date to the output file name
I created a pre processing fex in theRC which appends the asvalue column in the BOTTASK table but am only able to access DTSSCHEDULEID and DTSTASKID in original task it self not in the pre processing so , I have to supply the SCHEDULEID manually , which is not a good idea for me
So is there any way I can update the file name dynamically when scheduling the report in report caster other than EDA mailThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.6 Windows, All Outputs
April 09, 2012, 09:16 AM
Prarie
I have a Reportcaster job that runs each day and then I have a little copy job that runs and copies it to a location with the appended date, then I delete the first file. Maybe you can do something like this.
COPY \\CORP\GROUP\TRANS\DEMREPORT.xls \\CORP\GROUP\TRANS\DEMREPORT&MDYY...xls
NT DEL \\CORP\GROUP\TRANS \DEMREPORT.xls
April 09, 2012, 11:50 AM
FOCUS393
Thanks for the reply
How can we hold a report in a particular location ?
after holding can we rename by copying into different locations in the same fex
if am using distribution list for rc can we achieve the above
WebFOCUS 7.6 Windows, All Outputs
April 09, 2012, 02:18 PM
Prarie
In this case I FILEDEF the file to a location Put this at the top of the report FILEDEF MYDOC DISK \\CORP\GROUP\TRANS\REPORTRAPH.xls
Then in your report ON TABLE HOLD FORMAT EXL2K AS MYDOC
Yes you can copy it as manytimes and locations as you want. I have a link to the final location sent to users in the distribution list.
I'm sure others have different ideas that may come along.
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
April 09, 2012, 04:47 PM
Rick Man
I couldn't figure it out either. I opened a case with IBI and they finally threw up their hands and said there was an NFR outstanding that they would attach my case to. See: Case: 73392519 Summary: NFR: ReportCaster send report to FTP site with a timestamp
Reporting Server 7.6.10 Dev. Studio 7.6.8 Windows NT Excel, HTML, PDF
April 09, 2012, 10:18 PM
njsden
Have you considered concatenating the date and the original first BY field in a new virtual field and use the latter to burst the report instead?
As ReportCaster will put the BY value as part of the file name you will get your date in there ... just an idea.
This works for timestamps and any other variable you want to add to the filename.
In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
April 11, 2012, 08:52 AM
FOCUS393
But here is what I did temp fix
I had setup a diff job 5 mins early to the original job , which will update the asvalue column in Bottask table of webfocus
I tried the same thing in pre processioning fex but it did not worked because it is already taking the file name into the memory as soon as schedule execution is initiated
Thank you all
DavSmith's idea looks good I will give it a try
Njsden,Thanks but I have some distribution list based on the burst field if I concatenate the burst field with date for the by field then I have to change the distribution list every day because I have to concatenate the date field to the burst field in Distribution list too or I can generate dynamic distribution list from other fex which becomes complicated
WebFOCUS 7.6 Windows, All Outputs
April 17, 2012, 01:07 PM
simba
I had a report where the client wanted the date appended to the report name. Here is how we did it:
-* File newfex_car.fex APP PATH IBISAMP
DEFINE FILE CAR HIDDEN_SORT/I9 = &YYMD; END
TABLE FILE CAR SUM DEALER_COST BY HIDDEN_SORT NOPRINT BY COUNTRY BY CAR ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K -*ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, $ TYPE=TITLE, STYLE=BOLD, $ TYPE=TABHEADING, SIZE=12, STYLE=BOLD, $ TYPE=TABFOOTING, SIZE=12, STYLE=BOLD, $ TYPE=HEADING, SIZE=12, STYLE=BOLD, $ TYPE=FOOTING, SIZE=12, STYLE=BOLD, $ TYPE=SUBHEAD, SIZE=10, STYLE=BOLD, $ TYPE=SUBFOOT, SIZE=10, STYLE=BOLD, $ TYPE=SUBTOTAL, BACKCOLOR=RGB(210 210 210), $ TYPE=ACROSSVALUE, SIZE=9, $ TYPE=ACROSSTITLE, STYLE=BOLD, $ TYPE=GRANDTOTAL, BACKCOLOR=RGB(210 210 210), STYLE=BOLD, $ ENDSTYLE END
The HIDDEN_SORT saves the current date. When creating the job in RC, on the Task tab we checked the Parameter Name and the Burst Report checkboxes. We have the Report Name as newfex_car.xls. When the job is run, the report name is newfex_car_20120417.xls.
It's worked perfectly for us. I was in a RC training class at IBI and asked the instructor how to do this and this is what he came up with.
simba
WF 7.7/Windows
April 17, 2012, 05:08 PM
DavSmith
Simba, I just tested your solution and it does work if you want to send the entire report to a non-dynamic single or multi address.
Because adding the date to the filename depends on the BURST checkbox being checked, the dynamic distro burst process I describe above does not work. The reason why is because the first sort value in the report fex must match the first by sort field in the dynamic distro fex. This is true whether the first sorts are displayed or hidden. I tested this theory and could not make it work using Dynamic Distribution.
Thanks for providing this info, though. I'm sure it will prove useful for many.
In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle