PADR and LEN
Posted: Fri Feb 10, 2006 9:55 am
In my program I have a comments field, which, if empty, will save the filename used and place .rpt extension onto the filename. However, although the majority of these work, a few of them will show the filename with a large gap before the .rpt extension. how can I solve this?
EXAMPLE ;
[Monthly Account Invoice Proof .rpt]
The above should be displayed as
[Monthly Account Invoice Proof.rpt]
Here is the code used;
IF !Empty(cApp)
IF mFile == 1
mReportID := Alltrim(cApp)+".rpt"
mReportName := PADR(cApp,LEN(REPDETS->REP_NAME))
mRepComm := ("["+PADR(cApp,len(REPDETS->REP_NAME))+".rpt]")
RepIdValid()
EXAMPLE ;
[Monthly Account Invoice Proof .rpt]
The above should be displayed as
[Monthly Account Invoice Proof.rpt]
Here is the code used;
IF !Empty(cApp)
IF mFile == 1
mReportID := Alltrim(cApp)+".rpt"
mReportName := PADR(cApp,LEN(REPDETS->REP_NAME))
mRepComm := ("["+PADR(cApp,len(REPDETS->REP_NAME))+".rpt]")
RepIdValid()