Sets the current user name when searching for queries, charts, or reports.
You should call this method before attempting to get any information located in a user's Personal Queries folder. You must call this method before requesting user-specific items with the GetChartList, GetQueryList, or GetReportList methods.
VBScript
workspace.SetUserName userName
Perl
$workspace->SetUserName(userName);