all groups > sql server reporting services > november 2006 >
You're in the

sql server reporting services

group:

DataAdd narrowing conversion error



DataAdd narrowing conversion error Debralous
11/9/2006 12:48:37 PM
sql server reporting services: I am simply trying to take a date and add the value from another field
to it using the following expression:

=dateadd("d", " & Fields!new_tgddatefrom.Value & ",
Parameters!HolidayDate.Value)

new_tgddatefrom.Value is an int data type
HolidayDate.Value is a date


The expression works fine if I use an acutal number for the value to
add but when I use the field.value I get an error:

Overload resoution failed because no accessible 'DateAdd can be called
without a narrowing conversion.

Why or why is it so difficult to work with dates!?!? If anyone can
help me get this working I would sincerely appreciate it!

Debra
RE: DataAdd narrowing conversion error William
11/10/2006 2:19:01 PM
Try =dateadd("d", Fields!new_tgddatefrom.Value, Parameters!HolidayDate.Value)


[quoted text, click to view]
Re: DataAdd narrowing conversion error Debralous
11/16/2006 10:55:43 AM

[quoted text, click to view]
That was the first thing I tried. While it doesn't error, it doesn't
actually add the number of days in Fields!new_tgddatefrom.Value, it
just shows the date which is in Parameters!HolidayDate.Value.

Any other suggestions?
Re: DataAdd narrowing conversion error William
11/16/2006 11:51:03 AM
This is the proper function call:
= DateAdd(interval, number, date)

Are you sure you have valid datatypes and values for your parameters?
If the function is used in a report with multiple datasets or groupings, do
you need to declare a different scope for your function variables?


[quoted text, click to view]
AddThis Social Bookmark Button