Tuesday, March 27, 2012

embedded code to check parameter

Hi..
i have 2 parameters, start_date and end_date. is it possible to use
embedded code to prompt a message box if start_date is later than end
date ?
so far from what i've read, embedded code are called using the globally
defined 'Code' member. but in my case where i need to check the
parameters, how do i call the embedded code when user click the View
Report button ?
thanksss...The first thing that came to my mind is this:
1) Are you creating this report to run off a .NET webform? If you are,
you can make the check there and bring up the appropriate UI
2) The store procedure/or database call can also check the dates and
then either rerturn results, or one result saying "Error: Begin date is
after the end date" or if thta happens use default paramteres.
3) Also, you can edit report code to check the dates and either
hide/show (using the visible properties) , and display proper error
handling there.|||thanks Sorcerdon..
1) yes, the reports will run on .net webform. but where do i check?
2) the stored procedure will return a dataset.. so if i were to put a
one-line error message, the columns for table referencing the dataset
will be missing and hence caused an error when i preview report. or
have i done it incorrectly?
3) but the stored procedure will also be run if use the visibility
properties, no?
thanks again|||i manage to get the msg box out but without the caption.. i tried the
following code:
System.Windows.Forms.MessageBox.Show("Date Range From must be earlier
or the same as Date Range To","Error","OK","","")
but i received this error:
Overload resolution failed because no accessible 'Show' can be called
without a narrowing conversion:
i checked in msdn website and don't see what's wrong with my syntax...
anyhow, is there a way not to run the query for dataset since the dates
will not return result.
thanks..|||ops... i have another problem... the messagebox won't show when i view
it after deployment.

No comments:

Post a Comment