Use VB Variable to set Report Filename

Post Reply
User avatar
CrashN8
Site Admin
Site Admin
Posts: 424
Joined: Thu Feb 09, 2017 4:07 pm

Use VB Variable to set Report Filename

Post by CrashN8 » Fri Nov 08, 2019 4:24 pm

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

You do not have the required permissions to view the files attached to this post.

Post Reply