on 09-27-2010 1:48 PM
Hi guru,
When I am running a report the error is poping up " A string is required ". After clicking the OK, it is taking me to Forumla editor
{CLARITY_TDL_VIEW.POST_DATE} in {?Select Start Denial Post Date} to {?Select End Denial Post Date}
After doing some research, I tried using ToText and Cstr functions, But no luck. Please help me out
Regards
R
Reddy,
There are a couple of things to check...
#1) Look at {CLARITY_TDL_VIEW.POST_DATE} in the Field Explorer. Make sure the Show Field type is turned on (right click the the Database Fields and make sure there is a check mark next to it)... and make sure it says :DateTime next to the field name.
If in fact it does say DateTime, you shouldn't be having any problems using date or date time parameters in your formula.
If not, keep reading.
#2) Check the ODBC or OLE DB driver you are using. SQL Server introduced new drivers for 2008. You should be using the SQL Native Client 10.
#3) SQL Server 2008 also introduced 2 new date formats Date & SmallDateTime... In your last post you said you checked "the back end", which I assume means you looked in the SQL Server Management Studio. If you do in fact have access to the SSMS you can find your field in the Object Explorer to see which of the date types your field is.
You mentioned that it was formatted as 2006-12-31 00:00:00.000 which is the old standard DateTime, but it doesn't hurt to check any way.
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Long,
I checked the option # 1 as you mentioned where the Field type is showing just Date . Please let me know where I can change the Field type to Date Time.
Also Is there any possiblities to change the formula editor, just now I check 2 things , Tried with 1 # or 2 #
1# Record Selection
{CLARITY_TDL_VIEW.POST_DATE} in {?Select Start Denial Post Date} to {?Select End Denial Post Date}
by adding
ToTex({CLARITY_TDL_VIEW.POST_DATE}) in Totext({?Select Start Denial Post Date}) to ToText({?Select End Denial Post Date})
2# Forumla Field for >>>>> Reason
if isnull({CLARITY_RMC.REMIT_CODE_NAME}) then "UNKNOWN REASON"
else ({CLARITY_RMC.REMIT_CODE_NAME}) + " - " +
totext({CLARITY_RMC.REMIT_CODE_ID},0,"")
by Removing totext
if isnull({CLARITY_RMC.REMIT_CODE_NAME}) then "UNKNOWN REASON"
else ({CLARITY_RMC.REMIT_CODE_NAME}) + " - " +
{CLARITY_RMC.REMIT_CODE_ID}
But I don't know What exactly is happening >>> just did by reading some forums.
Well as long as you can see that CR is recognizing it as a date you should be fine you can change data types in CR. This is info that is supplied to CR by the database driver.
Don't convert your dates to text in the formula. CR won't process correctly unless it sees all 3 values as Date or DateTime.
Can you please provide me the info where I can change the Field Type in CR.
After converting in totext now I can see some data but let me know whether I going the right path or not ??
What exactly totext do's ??
If I convert the field type in CR to date time, will it work fine or do I need to change in the forumla too ??
Please suggest me, I am bit confused.
Thanks
You can't actually change a field type in CR. You can make CR treat a field type like a different field try by using a formula... Which is what you are doing when you use the ToText function.
No converting dates to text (using the ToText function) IS NOT the right path to go down. If you are trying to find dates that fall between to dates, then you need to keep everything as dates.
Jason
Hi,
First of all are your parameters Date as well? In the Field Explorer, right-click CLARITY_TDL_VIEW.POST_DATE and select Browse Data from the menu. At the top of the browse window, you should see the type. Is this Date as well? If they field and parameters don't match this will happen.
Secondly your formula is syntactically incorrect. I think this is the cause of your error. You need to have [ ] brackets around your date range like:
{CLARITY_TDL_VIEW.POST_DATE} in [{?Select Start Denial Post Date} to {?Select End Denial Post Date}]
Hope this helps,
Brian
Hi R,
Please check the format you are receiving date in. If the date format is DD/MM/YYYY, Crystal does not recognize it as a date and you will have to use the MID, LEFT & RIGHT functions to break the date and rearrange it in MM/DD/YYYY format before you can use the cdate function.
Thanks & regards,
Manu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.