Hi Magendo_man,
Thanks for the tip on the text box format property. That and setting
the parameter to datetime works fine. But now I am trying to use
custom code and hope you can shed some light for me.
What I have been trying to do since my las post was to use a custom
code function. So I typed the following into the custom code window:
Public Function GetMyDate(byval theUserDate as string) as string
If Isdate(theuserdate) then
Return Format(theUserDate, "MMM, YYYY")
Else
Return "Invalid Date"
End If
End Function
My problem is that when I try to access this code in the text box
function property by typing =Code.GetMyDate(Parameters!UserDate.Value)
I am not able to see a reference to the custom code. When I type Code.
I do not see my function but only a slection list of "Equals",
"GetHashCode","GetType", "Reference Equals" and "To String". I am
tinking I do not have something configured properly but according to
books on-line this should work.
BTW, I even simplifed my code to only have a pubic const and still
could not see it when I typed Code.
Any insight on (a) this approach and (b) what I am doing wrong?
Thanks for all your help,
John
On Fri, 8 Sep 2006 11:03:01 -0700, magendo_man
[quoted text, click to view] <sql@kappa.co.uk.(donotspam)> wrote:
>It isn't really possible to validate and format a directly entered report
>parameter.
>
>If your date parameter is a normal day/month/year then by defining the
>parameter as datetime it will ensure that you get a valid date. However, the
>system will then display the date according to your locale settings including
>a time element.
>
>If all you want to do is have a month and year entered then you would
>probably be best to generate this using a dataset either by (a) selecting
>valid month/year combinations from the same place as the report's main
>dataset, or (b) just making up a list of valid dates based on the range
>permissable, using a query/stored procedure.
>
>You can easily display and format your report parameters in textboxes using
>and expression, such as:
>=Parameters!MyReportParameter.Value
>This can be formatted using the textboxes format property