Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting lost when RPT converted to DSR

Status
Not open for further replies.
Jun 4, 2004
19
US
Hi all,

I have a report that has two number fields that I have to format to display as phone numbers. While both the custom function that came along with the app the database is associated with, as well as my home-grown formatting with "left" and "mid" and "right" work on an RPT file, as soon as I import it into my VB application and it becomes a DSR the formatting doesn't entirely stick -- what was (999) 999-9999 becomes (9,9) 99,-9.99 . It doesn't matter which function I'm using, both come up this way in the DSR, and formatting re-applied in the DSR is ignored. Any ideas?

Thanks.
 
hi
Crate a formula
@PhoneNum
Picture ({your phone number field},"(xxx) xxx-xxxx" )

cheers

pg

pgtek
 
Thanks pgtek, I hadn't used the Picture function before, I'm sure I'll find it useful in the future. Unfortunately it didn't work here though. I went into the DSR and created the formula there, as below:

picture(totext({Command.CustPhone}),"(xxx) xxx-xxxx")

and then dropped it on the report, ran the VB app to preview the report, and got the following:

(9,1) 94,-666,762.00

ugh. Any more ideas?

 
Try:

Picture(ToText({Command.CustPhone},0,""),"(xxx) xxx-xxxx").

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top