I have a report with a Dataset that has a query string:
exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado, @.Agencia,@.Ruta
The report is working, but I want to delete the parameter @.Rute and the
follow error are displaying:
An error has occurred during report processing.
Query execution failed for dataset "resumen"
Must declare the variable @.Usuario.
Plese help me.
--
MauryqTwo things to try. Click on the refresh fields button (to the right of the
...). The other thing is to click on the ... and go to the parameters tab
and make sure all the expected parameters are there.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Mauryq" <mauryq@.hotmail.com> wrote in message
news:3F2DFA2A-C1B9-4219-8EB7-7C71487DF6EF@.microsoft.com...
> I have a report with a Dataset that has a query string:
> exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado,
@.Agencia,@.Ruta
> The report is working, but I want to delete the parameter @.Rute and the
> follow error are displaying:
> An error has occurred during report processing.
> Query execution failed for dataset "resumen"
> Must declare the variable @.Usuario.
> Plese help me.
> --
> Mauryq|||When you create a dataset with a SP with parameters, automatically the
parameters are created at the report, but in this case the parameters can't
be created automatically, and have that created it manually, and when I eject
the preview is like the parameter cant be recognized.
exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado,
@.Agencia,@.Ruta
"Bruce L-C [MVP]" escribió:
> Two things to try. Click on the refresh fields button (to the right of the
> ...). The other thing is to click on the ... and go to the parameters tab
> and make sure all the expected parameters are there.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Mauryq" <mauryq@.hotmail.com> wrote in message
> news:3F2DFA2A-C1B9-4219-8EB7-7C71487DF6EF@.microsoft.com...
> > I have a report with a Dataset that has a query string:
> >
> > exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado,
> @.Agencia,@.Ruta
> >
> > The report is working, but I want to delete the parameter @.Rute and the
> > follow error are displaying:
> >
> > An error has occurred during report processing.
> > Query execution failed for dataset "resumen"
> > Must declare the variable @.Usuario.
> >
> > Plese help me.
> >
> > --
> > Mauryq
>
>|||I have had mixed results with RS automatically creating the parameters.
Sometimes it messes up. Did you try either of the two things I mentioned?
What happens when you click on the ... and go to the parameters tab?
I have had some stored procedures in SQL Server (I work with both Sybase and
SQL Server) that worked flawlessly with RS creating the Report Parameter.
When you have an @.Paramname in your SQL what happens is that RS looks for a
matching Report Parameter. If it doesn't see it then it assumes that it is a
T-SQL variable. You can have a multi-line T-SQL code with declare
@.SOMEVARIABLE. So what is happening to you is that the wiring between your
query parameters and your report parameters has gotten messed up. It is
important to remember that they are two different things (which gets
confusing because RS is being helpful behind the scenes and creating Report
Parameters).
You need to do two things. You need to check the parameter mapping ( click
on the ... and go to the parameter tab and make sure the query parameters
you expect are all there and are mapped to the appropriate Report
Parameter). You can also from layout view go to the Report Menu, Parameters.
You should see
You say you want to get rid of @.Ruta query parameter. Then you should delete
it from your query calling code, make sure it is deleted from the query
parameter to report parameter mapping and finally that it is not still a
report parameter.
exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado, @.Agencia
Note that you can also be in generic query designer and leave off the exec:
sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado, @.Agencia
I never use the exec. See if that helps at all.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Mauryq" <mauryq@.hotmail.com> wrote in message
news:7DF27C6B-F720-46D7-A24F-54641DD96461@.microsoft.com...
> When you create a dataset with a SP with parameters, automatically the
> parameters are created at the report, but in this case the parameters
> can't
> be created automatically, and have that created it manually, and when I
> eject
> the preview is like the parameter cant be recognized.
> exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado,
> @.Agencia,@.Ruta
>
> "Bruce L-C [MVP]" escribió:
>> Two things to try. Click on the refresh fields button (to the right of
>> the
>> ...). The other thing is to click on the ... and go to the parameters
>> tab
>> and make sure all the expected parameters are there.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Mauryq" <mauryq@.hotmail.com> wrote in message
>> news:3F2DFA2A-C1B9-4219-8EB7-7C71487DF6EF@.microsoft.com...
>> > I have a report with a Dataset that has a query string:
>> >
>> > exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado,
>> @.Agencia,@.Ruta
>> >
>> > The report is working, but I want to delete the parameter @.Rute and the
>> > follow error are displaying:
>> >
>> > An error has occurred during report processing.
>> > Query execution failed for dataset "resumen"
>> > Must declare the variable @.Usuario.
>> >
>> > Plese help me.
>> >
>> > --
>> > Mauryq
>>|||Mauryq,
whenever get this type of error, I go back to the source and debug from
there.
You say you want to remove a param. Did you already do this on the SProc
itself? Try exec from QA on the SQL instance to ensure the problem isn't at
the source, and then work forwards onto the RS.
Tony
"Bruce L-C [MVP]" wrote:
> I have had mixed results with RS automatically creating the parameters.
> Sometimes it messes up. Did you try either of the two things I mentioned?
> What happens when you click on the ... and go to the parameters tab?
> I have had some stored procedures in SQL Server (I work with both Sybase and
> SQL Server) that worked flawlessly with RS creating the Report Parameter.
> When you have an @.Paramname in your SQL what happens is that RS looks for a
> matching Report Parameter. If it doesn't see it then it assumes that it is a
> T-SQL variable. You can have a multi-line T-SQL code with declare
> @.SOMEVARIABLE. So what is happening to you is that the wiring between your
> query parameters and your report parameters has gotten messed up. It is
> important to remember that they are two different things (which gets
> confusing because RS is being helpful behind the scenes and creating Report
> Parameters).
> You need to do two things. You need to check the parameter mapping ( click
> on the ... and go to the parameter tab and make sure the query parameters
> you expect are all there and are mapped to the appropriate Report
> Parameter). You can also from layout view go to the Report Menu, Parameters.
> You should see
> You say you want to get rid of @.Ruta query parameter. Then you should delete
> it from your query calling code, make sure it is deleted from the query
> parameter to report parameter mapping and finally that it is not still a
> report parameter.
> exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado, @.Agencia
> Note that you can also be in generic query designer and leave off the exec:
> sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado, @.Agencia
> I never use the exec. See if that helps at all.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Mauryq" <mauryq@.hotmail.com> wrote in message
> news:7DF27C6B-F720-46D7-A24F-54641DD96461@.microsoft.com...
> > When you create a dataset with a SP with parameters, automatically the
> > parameters are created at the report, but in this case the parameters
> > can't
> > be created automatically, and have that created it manually, and when I
> > eject
> > the preview is like the parameter cant be recognized.
> >
> > exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado,
> > @.Agencia,@.Ruta
> >
> >
> > "Bruce L-C [MVP]" escribió:
> >
> >> Two things to try. Click on the refresh fields button (to the right of
> >> the
> >> ...). The other thing is to click on the ... and go to the parameters
> >> tab
> >> and make sure all the expected parameters are there.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Mauryq" <mauryq@.hotmail.com> wrote in message
> >> news:3F2DFA2A-C1B9-4219-8EB7-7C71487DF6EF@.microsoft.com...
> >> > I have a report with a Dataset that has a query string:
> >> >
> >> > exec sp_ReporteFlashVentasXRutaYDiario @.Usuario, 1, @.Mercado,
> >> @.Agencia,@.Ruta
> >> >
> >> > The report is working, but I want to delete the parameter @.Rute and the
> >> > follow error are displaying:
> >> >
> >> > An error has occurred during report processing.
> >> > Query execution failed for dataset "resumen"
> >> > Must declare the variable @.Usuario.
> >> >
> >> > Plese help me.
> >> >
> >> > --
> >> > Mauryq
> >>
> >>
> >>
>
>
No comments:
Post a Comment