Mike, one thing to consider is the special character "/" in the date format.
I don't think you can use this in a file name.  So you may have to change
the format for the date structure before using in the name of the file.
Remove the "/" or replace with it with a "-" or leave it out altogether. 

 

Based on your comment below, it looks like you need to leave it out so you
may have strip out "/" before you place it as a part of the name.  In that
case you may want to do the following for each date..

 

Set var vstdat = (how ever you establish)

Set var vstdattxt = (CTXT(.vstdat))

Set var vstdatdat = (SSTRIPI(.vstdattxt,' /'))

 

Set var vTHRDT= (how ever you establish)

Set var vTHRDTtxt = (CTXT(.vTHRDT))

Set var vTHRDTdat= (SSTRIPI(.vTHRDTtxt,' /'))

 

This place both dates in text mode without having "/" as a part of the name.

 

Set var vfnm = (.vstdatdat + '-' + vTHRDTdat + '.xls')

 

This should give you the value you want.

 

Gary

 

  _____  

From: [email protected] [mailto:[email protected]] On Behalf Of mike epstein
sony viao office
Sent: Saturday, October 03, 2009 8:50 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: DYNAMIC FILENAME FOR XLSPREADSHEET

 

Dawn

 

I had tried the ampersand and couldn't get the value 09242009-09302009.xls ?


 

From: [email protected] [mailto:[email protected]] On Behalf Of
[email protected]
Sent: Saturday, October 03, 2009 8:34 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: DYNAMIC FILENAME FOR XLSPREADSHEET

 


SET VAR VFNM TEXT = ((CTXT(.VSTDT)+'-'+(CTXT(.VTHRDT)+'.XLS'))) 

PRINT EMPPYSM2V2s1a WHERE enddate >= .VSTDT and enddate <= .VTHRDT + 
 OPTION XLS + 
 |FILENAME &vfnm +                   
 |SHOW_CANCEL_DIALOG OFF + 
 |ALL_TEXT_IN_GENERAL_FORMAT off + 
 |CELL_ATTR On + 
 |INCLUDE_IMAGES OFF + 
 |INCLUDE_LINES OFF + 
 |INCLUDE_RICH_TEXT On + 
 |RICHTEXT_ENCODING_TYPE IMAGE + 
 |INCLUDE_SHAPES OFF + 
 |LINE_SPACE ACTUAL + 
 |ONE_SHEET_PER_PAGE ON + 
 |OPEN ON 

Dawn Hast


[email protected] wrote on 10/03/2009 09:26:01 AM:

> Good Morning all 
>   
>   
> Having a blurb and maybe some on can help. 
>   
> SET VAR VFNM TEXT = ((CTXT(.VSTDT)+'-'+(CTXT(.VTHRDT)+'.XLS')))       
> I would like a variable to be the filename using two dates 
>   
> PRINT EMPPYSM2V2s1a WHERE enddate >= .VSTDT and enddate <= .VTHRDT + 
> OPTION XLS + 
> |FILENAME NEW.XLS +              How would I express the variable here?

> |SHOW_CANCEL_DIALOG OFF + 
> |ALL_TEXT_IN_GENERAL_FORMAT off + 
> |CELL_ATTR On + 
> |INCLUDE_IMAGES OFF + 
> |INCLUDE_LINES OFF + 
> |INCLUDE_RICH_TEXT On + 
> |RICHTEXT_ENCODING_TYPE IMAGE + 
> |INCLUDE_SHAPES OFF + 
> |LINE_SPACE ACTUAL + 
> |ONE_SHEET_PER_PAGE ON + 
> |OPEN ON 
>   
>   
> Thanks 
>   
>   
> Mike 

DISCLAIMER:  This electronic message together with any attachments is
confidential.  If you are not the intended recipient, do not copy, disclose
or use the contents in any way.  Please also advise us by return e-mail that
you have received the message and then please destroy.  Evergreen Packaging
is not responsible for any changes made to this message and / or any
attachments after sending by Evergreen Packaging.  We use virus scanning
software but exclude all liability for viruses or anything similar in this
email or any attachment. 

Reply via email to