Page 1 of 1

Use VB Variable to set Report Filename

Posted: Fri Nov 08, 2019 4:24 pm
by CrashN8
It's possible to create customer report filename / file path using VB Script and Customer Data options in Report Properties.

Create VB String Variable... Could be a single String variable or String concatenation like this:

Code: Select all

MyName = InputBox("what is your name?", "Enter Name")

MyLot = InputBox("Lot Number?", "Enter Lot Number")

FileName = MyName + "_" + MyLot
Now use that VB Variable in Report Properties like this - note the filename in Report Properties appears to be blank it must contain a character like " " or "_"

Also note you can control File Path by adding "\" character(s) to VB String Variable.
VB_Variable_Report_Filename.jpg


The Vb Script above results in 2 InputBox(), when populated as shown the result is report file here - C:\Users\Public\ Nathan_42.rpt
VB_Variable_Report_Filename_2.jpg