Barbara Trowbridge Posted September 23, 2021 Share Posted September 23, 2021 Not sure which category- but is there a way to append date/timestamp onto a file as we deliver it using ReportCaster thanks in advance! Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted September 24, 2021 Share Posted September 24, 2021 Hi Barb I was successful creating a global variable in the server profile -SET &&DT = AYMD(&YYMD,-0,I8YYMD) | ' | EDIT(&TOD,99$99$99); and in the RC schedule under the task parameter save report as I reference the global variable. In my case it was product_revenue&&DT Link to comment Share on other sites More sharing options...
David Beagan Posted September 24, 2021 Share Posted September 24, 2021 Chuck, there are a large number of date time variables available. Your expression on the right side of the = sign could be replaced by &DATEH14 So you wouldnt need to create a global variable in server profile, just use the variable directly. Link to comment Share on other sites More sharing options...
Pierre CASTILLO 2 Posted September 24, 2021 Share Posted September 24, 2021 Nice usage of date time variables ! If your OS handles it you can also use &DATEH17 for milliseconds &DATEH20 for microseconds &DATEH23 for nanoseconds Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted September 24, 2021 Share Posted September 24, 2021 When I tried a regular & variable I got an error that a value was missing, but I went back this morning and tried &DATEH14 and it worked fine. So you are right to keep it simple Link to comment Share on other sites More sharing options...
Barbara Trowbridge Posted September 24, 2021 Author Share Posted September 24, 2021 Sorry for my naivete- but is David saying that you would only need to Save Report As: product_revenue_&DATEH14 My colleague gave me some code to use in the .fex and more changes for ReportCaster- but if I can append date/timestamp with one step- Im all for it! Please clarify When I tried the product_revenue_&DATEH14- in the Task only, thats literally what prints out on the file- not the date/timestamp. I must be missing something. Should that be in the .fex as well or only in the Task of the Schedule Should it be in the Distribution Information: Name: product_revenue_&DATEH14 Ive been trying various permutations and I havent gotten it to work yet. Thanks again Link to comment Share on other sites More sharing options...
David Beagan Posted September 24, 2021 Share Posted September 24, 2021 Yes seems like it should work for you: product_revenue_&DATEH14 What release of WebFOCUS are you using Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted September 24, 2021 Share Posted September 24, 2021 Barb Your example above has a - at the end, maybe that was a typo but you dont want a dash at the end. That is the only place you need to reference the variable. Link to comment Share on other sites More sharing options...
Barbara Trowbridge Posted September 28, 2021 Author Share Posted September 28, 2021 Hi David: We are planning to move to 8.2.07 but are currently on 8.2.01M. Ill try a few more times. I was able to get a combination of things working- a change of code in the .fex, a .fex to reference, and changes in the schedule- but much prefer the method you and Chuck recommend- one change to the schedule itself- much easier to maintain. Thanks so much for your help! Link to comment Share on other sites More sharing options...
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