I have been creating some reports with RS2005, and encountered an odd problem:
Going into the data tab, I can edit my data set, and see that my parameters
are properly mapped. Leaving 'edit', I click on 'Refresh Fields', and
instead of being prompted for the 4 parameters I expect to see, there is only
one. I fill that one out and continue, and receive multiple "Must declare
the scalar variable '@.variablename' " errors. Going back into the data set
edit, all of my parameter mapping is gone.
The approach I've taken (on new reports when this happens) is to declare the
parameters as variables, long enough to get a successful 'refresh fields',
then delete the variables, and map them as parameters. As long as I get back
on the layout tab immediately and save changes, the parameter mapping
survives.
If I select 'Run' on the data tab, I lose the same three parameters as with
'Refresh Fields', but upon going back into edit of the data set, the
parameter mapping is still intact.
If this were just me, or just my PC, I'd consider reinstalling, etc., but
I've got a co-worker who is having the same problem on his PC.
Any thoughts, suggestions, me-too stories?
Thanks,
BruceThis has happened to me just recently - I had to repopulate the Fields
all over! ><|||I've had this happen with ODBC (unnamed parameters) but not with SQL Server.
Is this to a stored procedure or with just straight SQL?
What I did (your way was not an option) is I would view the code and change
the query in the rdl file. If you do this make a copy first.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"MrGrumpy" <MrGrumpy@.discussions.microsoft.com> wrote in message
news:18FE993D-0A47-4CA4-A183-BE7F8766900A@.microsoft.com...
>I have been creating some reports with RS2005, and encountered an odd
>problem:
> Going into the data tab, I can edit my data set, and see that my
> parameters
> are properly mapped. Leaving 'edit', I click on 'Refresh Fields', and
> instead of being prompted for the 4 parameters I expect to see, there is
> only
> one. I fill that one out and continue, and receive multiple "Must declare
> the scalar variable '@.variablename' " errors. Going back into the data
> set
> edit, all of my parameter mapping is gone.
> The approach I've taken (on new reports when this happens) is to declare
> the
> parameters as variables, long enough to get a successful 'refresh fields',
> then delete the variables, and map them as parameters. As long as I get
> back
> on the layout tab immediately and save changes, the parameter mapping
> survives.
> If I select 'Run' on the data tab, I lose the same three parameters as
> with
> 'Refresh Fields', but upon going back into edit of the data set, the
> parameter mapping is still intact.
> If this were just me, or just my PC, I'd consider reinstalling, etc., but
> I've got a co-worker who is having the same problem on his PC.
> Any thoughts, suggestions, me-too stories?
> Thanks,
> Bruce
>|||The code initially was a stored procedure, but I had to bring it into the
report directly when I realized that I couldn't use a multi-valued parameter
with a stored procedure.
My co-worker has gone with editing the XML directly, which sounds like what
you're suggesting (although it seems really risky to me)
- Bruce
"Bruce L-C [MVP]" wrote:
> I've had this happen with ODBC (unnamed parameters) but not with SQL Server.
> Is this to a stored procedure or with just straight SQL?
> What I did (your way was not an option) is I would view the code and change
> the query in the rdl file. If you do this make a copy first.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "MrGrumpy" <MrGrumpy@.discussions.microsoft.com> wrote in message
> news:18FE993D-0A47-4CA4-A183-BE7F8766900A@.microsoft.com...
> >I have been creating some reports with RS2005, and encountered an odd
> >problem:
> >
> > Going into the data tab, I can edit my data set, and see that my
> > parameters
> > are properly mapped. Leaving 'edit', I click on 'Refresh Fields', and
> > instead of being prompted for the 4 parameters I expect to see, there is
> > only
> > one. I fill that one out and continue, and receive multiple "Must declare
> > the scalar variable '@.variablename' " errors. Going back into the data
> > set
> > edit, all of my parameter mapping is gone.
> >
> > The approach I've taken (on new reports when this happens) is to declare
> > the
> > parameters as variables, long enough to get a successful 'refresh fields',
> > then delete the variables, and map them as parameters. As long as I get
> > back
> > on the layout tab immediately and save changes, the parameter mapping
> > survives.
> >
> > If I select 'Run' on the data tab, I lose the same three parameters as
> > with
> > 'Refresh Fields', but upon going back into edit of the data set, the
> > parameter mapping is still intact.
> >
> > If this were just me, or just my PC, I'd consider reinstalling, etc., but
> > I've got a co-worker who is having the same problem on his PC.
> >
> > Any thoughts, suggestions, me-too stories?
> >
> > Thanks,
> > Bruce
> >
>
>
No comments:
Post a Comment