Toad World® Forums

Toad Automation - Report Prefix required

Hi there

I’ve started to explore and set up reports via Autoamation but have encountered an issue as it’s not possible to set up a Prefix on the exported report as shown below.

You can only add a Suffix, i use the following convention “yyyymmdd_filename” so although it’s not the end of the world having to go and rename the file each week it kind of defeats the object of Automation.

Any help or tips would be much appreciated.

Many thanks

Karl

NOTE: I’m unable to add my image as it’s throwing an error each time i try

Hi Karl,

I create TSS-1299 for this. But maybe this will not improved in TSS 6.7 version.I will keep this update.

Sorry for your inconvenience.

Kelly

Hi Karl,

Try this:

  1. use a Set variable activity
  2. of type SQL
  3. to execute “SELECT getdate()… + apply custom format and cast as varchar”
  4. name the variable - let’s say DatePrefix
  5. in your filename input textbox enter [tag:DatePrefix]#_your_file_name.csv
  6. (please note the # character indicating the boundaries of a variable name)
    After you execute it all occurrences of the [tag:DatePrefix]# tag will be replaced by the current value of the DatePrefix string variable

For future - i have been assigned the QAT-7323 enhancement to add built-in system variables such as system time in etc…

Please do let me know if you have any questions.

Thanks Kelly hopefully it will get picked up in a future release

I’ll give that a try Martin and see how it goes, thank you