Posted 4 May 2006 I try to make a report in CX Supervisor with a variable number at the end. It should look like: Report_123.txt I tried this script: GenerateReport(ReportPath + "\report1.txt",ReportPath + "\Report_((Batch_nr)).txt") or GenerateReport(ReportPath + "\report1.txt",ReportPath + "\Report_((%d,Batch_nr)).txt") report1.txt is the original file and should be generated to an new report. But I get only files like: Report_((Batch_nr)).txt, while I want it to be Report_123.txt Is there a solution for this. Share this post Link to post Share on other sites
Posted 5 May 2006 I also have played with something like this but dropped it as I couldn't get it right. The problem is that the filename is already within quotes, therefore the point substitution ((...)) isn't executed and the filename becomes whatever you put in between the quotes. Perhaps you can set a text point e.g. ReportName with the filename and use the text point when you generate the report. Or use an alias ? Share this post Link to post Share on other sites
Posted 5 May 2006 Hello ACDC, Try - GenerateReport(ReportPath + "\report1.txt",ReportPath + "\Report_" + ((Batch_nr)) + ".txt"). This is a fairly standard method used to concatenate a variable within a string. In this instance, "Report_" (string) with Batch-nr (variable) and ".txt" (string). Hope this helps Regards anonymous Share this post Link to post Share on other sites
Posted 5 May 2006 (edited) This one works: value = Batch_nr value defined as integer textpoint = ValueToText(value) textpoint defined as string GenerateReport(ReportPath + "\report1.txt",ReportPath + "\Report_" + textpoint + ".txt") Thanks for the help! Edited 5 May 2006 by AC DC Share this post Link to post Share on other sites