Showing posts with label parameter. Show all posts
Showing posts with label parameter. Show all posts

Sunday, March 11, 2012

check constraint on input parameter

New to SQL server 2000 and wondering if it's possible to define a check
constraint on an input parameter
(stored procedure).
My input parameter(defined as smallint) should only accept the values 0, 1
or 2.
Would appreciate any help.
Message posted via http://www.webservertalk.comI dont think it is possible. But what you can do instead is the have a
check in the stored procedure and raise an error if the value passed is
not one of the expected values.|||you'd have to either
1) raise an error at the top of the procedure
2) default to 0 for <0 or 2 for >2
e.g.
create procedure myproc @.input1 smallint as
if @.input1 not between 0 and 2
begin
raiserror('Procedure myproc requires parameter @.input1 to be between
0 and 2', 16, 1)
return -1
end
...
or
create procedure myproc @.input1 smallint as
select @.input1 = case when @.input1<0 then 0 when @.input1>2 then 2 else
@.input1 end
...
Cismail via webservertalk.com wrote:
> New to SQL server 2000 and wondering if it's possible to define a check
> constraint on an input parameter
> (stored procedure).
> My input parameter(defined as smallint) should only accept the values 0,
1
> or 2.
> Would appreciate any help.
>|||That's what I thought.
Thanks for your help.
SQL novice wrote:
>I dont think it is possible. But what you can do instead is the have a
>check in the stored procedure and raise an error if the value passed is
>not one of the expected values.
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200511/1

Saturday, February 25, 2012

Chart X-axis & Y-axis Title

Does RS allow to use expression to generate titles for X- and Y-axis, either
through a field obtained from the database or a Parameter ?
Right now, even after SP1, I do not see a button that leads to <Expression>
dialog for X and Y-axis title, similar to say a <textbox> control.
Thanks.Although there is no expression builder button there, you can type any
expression you want for axes titles.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Kam" <Kam@.discussions.microsoft.com> wrote in message
news:9543D0CD-C766-4ED5-BEDA-CD43728F2728@.microsoft.com...
> Does RS allow to use expression to generate titles for X- and Y-axis,
> either
> through a field obtained from the database or a Parameter ?
> Right now, even after SP1, I do not see a button that leads to
> <Expression>
> dialog for X and Y-axis title, similar to say a <textbox> control.
> Thanks.

Chart x-axis

I am trying to create a chart using end_date (parameter) as the x-axis. I
have set up the category group expression as "=Month(Fields!End_Date.Value)"
and this is used for my x-axis. When the report is viewed, it shows January -
September, November, December, then October. The end_date is setup as
datetime datatype. The value and the labels are correct, just in the wrong
order. How can I get this x-axis in the correct order?On Aug 14, 9:08 pm, j_rad <j_...@.discussions.microsoft.com> wrote:
> I am trying to create a chart using end_date (parameter) as the x-axis. I
> have set up the category group expression as "=Month(Fields!End_Date.Value)"
> and this is used for my x-axis. When the report is viewed, it shows January -
> September, November, December, then October. The end_date is setup as
> datetime datatype. The value and the labels are correct, just in the wrong
> order. How can I get this x-axis in the correct order?
Hi,
Try to put the sorting expression of the group =Month(Fields!
End_Date.Value)
with ascending order.
V.|||That worked. Thanks for your help.
"Vinnie" wrote:
> On Aug 14, 9:08 pm, j_rad <j_...@.discussions.microsoft.com> wrote:
> > I am trying to create a chart using end_date (parameter) as the x-axis. I
> > have set up the category group expression as "=Month(Fields!End_Date.Value)"
> > and this is used for my x-axis. When the report is viewed, it shows January -
> > September, November, December, then October. The end_date is setup as
> > datetime datatype. The value and the labels are correct, just in the wrong
> > order. How can I get this x-axis in the correct order?
> Hi,
> Try to put the sorting expression of the group =Month(Fields!
> End_Date.Value)
> with ascending order.
> V.
>

Sunday, February 19, 2012

Chart error: Parameter is not valid

Hi,
I'm using Reporting Services 2005, trying to design a report in Visual
Studio 2005.
I have a chart in the report that seems to work just fine when I test it
with Preview.
However, every now and then, if I change some trivial detail in the chart
properties, such as the title font, the chart suddenly won't render in design
mode, instead displaying the following error: "Parameter is not valid."
Does anyone have any idea what might be causing this?I sometimes get the same error in charts but they are still working in
preview.
It´s really strange...
"Rolf Smeds" <Rolf Smeds@.discussions.microsoft.com> escribió en el mensaje
news:8BE6B851-1C4A-4CEC-8943-28F1F703F362@.microsoft.com...
> Hi,
> I'm using Reporting Services 2005, trying to design a report in Visual
> Studio 2005.
> I have a chart in the report that seems to work just fine when I test it
> with Preview.
> However, every now and then, if I change some trivial detail in the chart
> properties, such as the title font, the chart suddenly won't render in
> design
> mode, instead displaying the following error: "Parameter is not valid."
> Does anyone have any idea what might be causing this?