Friday, March 30, 2012

report does not accept null values for its parameters

Hi all
Im using a stored procedure with in params as datasource to a report.
These params are initialized to null by default in the procedure.
When executing this datasource in the report designer's data tab
every thing works fine - i can live these parameters with nulls (or set
other values) and the procedures return appropriate results.
Then in the report parameters tab i allow these params to get null values,
with no default value.
But when executing the report in the 'preview' mode of visual studio i must
enter values for all params or else the report is not displayed at all (not
even with empty result set..).
No error massage is displayed - just the default blank background..
Thanks for your attention
ReaThe report will not execute unless you provide Default values in the Report
Parameters dialog. Without setting a default value on each and every
parameter, RS has no way of knowing what to use. It is unaware that your SP
has default values assigned.
hth
fmi see www.sqlreportingservices.net
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Rea Peleg" <rea_p@.afek.co.il> wrote in message
news:%23nq$JF3YEHA.2500@.TK2MSFTNGP09.phx.gbl...
> Hi all
> Im using a stored procedure with in params as datasource to a report.
> These params are initialized to null by default in the procedure.
> When executing this datasource in the report designer's data tab
> every thing works fine - i can live these parameters with nulls (or set
> other values) and the procedures return appropriate results.
> Then in the report parameters tab i allow these params to get null values,
> with no default value.
> But when executing the report in the 'preview' mode of visual studio i
must
> enter values for all params or else the report is not displayed at all
(not
> even with empty result set..).
> No error massage is displayed - just the default blank background..
> Thanks for your attention
> Rea
>|||ok then how do i set null values as default values for report's parameters'
i tried : null , =null, =System.DBnull - all were rejected by compilation.
Thanks again
Rea
"William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
news:uAKFBp3YEHA.1764@.TK2MSFTNGP10.phx.gbl...
> The report will not execute unless you provide Default values in the
Report
> Parameters dialog. Without setting a default value on each and every
> parameter, RS has no way of knowing what to use. It is unaware that your
SP
> has default values assigned.
> hth
> fmi see www.sqlreportingservices.net
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> __________________________________
> "Rea Peleg" <rea_p@.afek.co.il> wrote in message
> news:%23nq$JF3YEHA.2500@.TK2MSFTNGP09.phx.gbl...
> > Hi all
> > Im using a stored procedure with in params as datasource to a report.
> > These params are initialized to null by default in the procedure.
> > When executing this datasource in the report designer's data tab
> > every thing works fine - i can live these parameters with nulls (or set
> > other values) and the procedures return appropriate results.
> > Then in the report parameters tab i allow these params to get null
values,
> > with no default value.
> > But when executing the report in the 'preview' mode of visual studio i
> must
> > enter values for all params or else the report is not displayed at all
> (not
> > even with empty result set..).
> > No error massage is displayed - just the default blank background..
> > Thanks for your attention
> > Rea
> >
> >
>|||=Nothing
(according to Peter)
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Rea Peleg" <rea_p@.afek.co.il> wrote in message
news:uip9OnAZEHA.1356@.TK2MSFTNGP09.phx.gbl...
> ok then how do i set null values as default values for report's
parameters'
> i tried : null , =null, =System.DBnull - all were rejected by compilation.
> Thanks again
> Rea
> "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
> news:uAKFBp3YEHA.1764@.TK2MSFTNGP10.phx.gbl...
> > The report will not execute unless you provide Default values in the
> Report
> > Parameters dialog. Without setting a default value on each and every
> > parameter, RS has no way of knowing what to use. It is unaware that your
> SP
> > has default values assigned.
> >
> > hth
> > fmi see www.sqlreportingservices.net
> >
> >
> > --
> > ____________________________________
> > William (Bill) Vaughn
> > Author, Mentor, Consultant
> > Microsoft MVP
> > www.betav.com
> > Please reply only to the newsgroup so that others can benefit.
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > __________________________________
> >
> > "Rea Peleg" <rea_p@.afek.co.il> wrote in message
> > news:%23nq$JF3YEHA.2500@.TK2MSFTNGP09.phx.gbl...
> > > Hi all
> > > Im using a stored procedure with in params as datasource to a report.
> > > These params are initialized to null by default in the procedure.
> > > When executing this datasource in the report designer's data tab
> > > every thing works fine - i can live these parameters with nulls (or
set
> > > other values) and the procedures return appropriate results.
> > > Then in the report parameters tab i allow these params to get null
> values,
> > > with no default value.
> > > But when executing the report in the 'preview' mode of visual studio i
> > must
> > > enter values for all params or else the report is not displayed at all
> > (not
> > > even with empty result set..).
> > > No error massage is displayed - just the default blank background..
> > > Thanks for your attention
> > > Rea
> > >
> > >
> >
> >
>|||Thanks i found a way:
Null values should be added to the parameter's result set/data source.
Then you allow null values for it and set for default value - none.
I hope =Nothing does not work because i spent some 2 hours figuring in
out...:))
Rea
"William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
news:ew$ZIAJZEHA.2016@.TK2MSFTNGP09.phx.gbl...
> =Nothing
> (according to Peter)
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> __________________________________
> "Rea Peleg" <rea_p@.afek.co.il> wrote in message
> news:uip9OnAZEHA.1356@.TK2MSFTNGP09.phx.gbl...
> > ok then how do i set null values as default values for report's
> parameters'
> > i tried : null , =null, =System.DBnull - all were rejected by
compilation.
> > Thanks again
> > Rea
> >
> > "William (Bill) Vaughn" <billvaRemoveThis@.nwlink.com> wrote in message
> > news:uAKFBp3YEHA.1764@.TK2MSFTNGP10.phx.gbl...
> > > The report will not execute unless you provide Default values in the
> > Report
> > > Parameters dialog. Without setting a default value on each and every
> > > parameter, RS has no way of knowing what to use. It is unaware that
your
> > SP
> > > has default values assigned.
> > >
> > > hth
> > > fmi see www.sqlreportingservices.net
> > >
> > >
> > > --
> > > ____________________________________
> > > William (Bill) Vaughn
> > > Author, Mentor, Consultant
> > > Microsoft MVP
> > > www.betav.com
> > > Please reply only to the newsgroup so that others can benefit.
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > __________________________________
> > >
> > > "Rea Peleg" <rea_p@.afek.co.il> wrote in message
> > > news:%23nq$JF3YEHA.2500@.TK2MSFTNGP09.phx.gbl...
> > > > Hi all
> > > > Im using a stored procedure with in params as datasource to a
report.
> > > > These params are initialized to null by default in the procedure.
> > > > When executing this datasource in the report designer's data tab
> > > > every thing works fine - i can live these parameters with nulls (or
> set
> > > > other values) and the procedures return appropriate results.
> > > > Then in the report parameters tab i allow these params to get null
> > values,
> > > > with no default value.
> > > > But when executing the report in the 'preview' mode of visual studio
i
> > > must
> > > > enter values for all params or else the report is not displayed at
all
> > > (not
> > > > even with empty result set..).
> > > > No error massage is displayed - just the default blank background..
> > > > Thanks for your attention
> > > > Rea
> > > >
> > > >
> > >
> > >
> >
> >
>

No comments:

Post a Comment