on 09-19-2008 6:41 PM
Hello,
I got a problem to show Year 2008 as 2,008.00, it's rediculous...
My PC and Notebook both show "2008", but my three co-workers' PCs all show "2,008.00"
the group field is: CStr(Year({SJ_Inv;1.TaxDate}))+ ' Sales Analysis'
How to convert such a numeric into text without decimal? CStr looks not workable.
also,
the numeric var in parameter window, sometimes I don't want it to show up comma and decimal, how to format it?
And, the datetime var in parameter window from store procedure, can it be a "Date" without Time for user to entry only?
I will be very appreciate for your helping.
~Michelle
Hi, Raghavendra,
Thanks for your information. I'll keep that.
(a little comlicated, I'd like to know if any Declare Date var !)
~Michelle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Raghavendra,
The reason to use stored procedure is to save server room -- limited data for output; this is why we declare variable in Store procedure, and got problem there -- datetime but not date.
On the other hand, if we declare variable in Crystal report, it's allowed date type, but how to defaut the Date-from as 1st day of current month, and Date-to as Today in Crystal Report parameter setup ?? And then how to pass the parameter to store procedure to limit the data output volume?
(I am also trying to get this done in Store procedure right now..)
The pros and cons exist in Store procedure and Crystal report, which is better is not definite!
Best regards,
Try this,
totext(Year({SJ_Inv;1.TaxDate}),"##")+ ' Sales Analysis'
which gives you the output as "2008 Sales Analysis".
For the date prompt you need to select the data type as Date but not DateTime
Regards,
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Allen,
If you want the date value from datetime field then you need to convert the datetime to char at database level like this
select convert(char,datetime field,101) from table
same for the decimal field to remove commas use
select cast(field as int) from table
which gives you the output in string format and while using these fields you need to convert it to date field or numeric field using formulas in crystal.
Regards,
Raghavendra
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.