Print Page | Close Window

Unbound string to display properly

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1782
Printed Date: 05 May 2024 at 6:33pm


Topic: Unbound string to display properly
Posted By: Enzyme80
Subject: Unbound string to display properly
Date Posted: 28 Nov 2007 at 9:24am
I have an unbound string on my report that holds two numbers and a dash between them (customer number invoice number).  When I preview the report just by going to Main Report Preview it displays correct, however, when I open up the web page I created and go to the report it displays with commas and decimal points.  For example:
In the Main Report Preview it shows as
1071-591
on the web page itself it shows as
1,071.00-591.00
 
This is an unbound string because of the - and I get this number on the fly. 
 
Any help would be great.



Replies:
Posted By: BrianBischof
Date Posted: 28 Nov 2007 at 11:19am
Looks like CR is converting it from a string to numbers upon exporting to the web. Obviously a bug. I would try forcing it to a string in CR using the CSTR() function. This would tell CR to keep it a string without converting it to a number. I have no idea if this will work, but it might be a way around the bug.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: Enzyme80
Date Posted: 28 Nov 2007 at 11:41am
CSTR({RCV.CN} & "-" & {RCV.IN})
I tried the above code in the formula and it still returns the same thing.  So something a little strange is if I put both fields on the report (not in an unbound string) they show up correct.  Oh well I guess as long as I did the CSTR function correct then I will at least have a good reason why this is not working.  Thanks for the help.



Print Page | Close Window