Hi.
I'm new in OLEBD and I have some problems when I'm creating query for
report. The way to uses parameters in query is with '?' instead of '@.'.
So, for each '?' symbol in the query the Report Designer creates one
parameter. But, what's happening if I need to use the same parameter in
the Query? I don't need that the Report Designer creates another
parameter. How can I resolve my problem'
Thanks.What you do is go into the mapping (click on the ..., parameters tab) and
map them to the same report parameter.
What I do first though is go to layout, report parameter menu and I change
the parameter name to something that means something to me. Then I go back
to the data tab, ..., parameters and change the mapping.
Also, you can delete any extra parameters from the report parameters menu
(layout tab).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gave" <vasgabriel@.gmail.com> wrote in message
news:1135264018.222907.10650@.f14g2000cwb.googlegroups.com...
> Hi.
> I'm new in OLEBD and I have some problems when I'm creating query for
> report. The way to uses parameters in query is with '?' instead of '@.'.
> So, for each '?' symbol in the query the Report Designer creates one
> parameter. But, what's happening if I need to use the same parameter in
> the Query? I don't need that the Report Designer creates another
> parameter. How can I resolve my problem'
> Thanks.
>|||Bruce Thanks for the immediate reply. I'm using RS 2000 with Visual
Studio 2003. When I create the query, like this:
Select ...
>From ....
Where (fieldName between ? and ?)
The report designer creates two parameters named 'Parameter1' and
'Parameter2'. You said that I need to map the parameter on parameters
tab. But I don't find where I can do that. Where I can map the
parameters? The only thing that I can do is go to layout and change the
parameter name on Report parameter menu. But I get the error:
The value expression for the query parameter '?' refers to a
non-existing report parameter 'Parameter1'.
Could you please be more explicit?
Thanks again.|||On the data tab (I said this in the previous posting but perhaps was not
clear).
On the data tab you should see a ... next to the dataset name. Click on the
..., go to the Parameters tab.
This is an important thing to be able to do. You can have your query
parameter based on an expression as well as a report parameter. Or you can
have several parameters based off of the same report parameter (which is
what you want to do).
Also, after changing the name of the report parameter this is where you need
to go to remap the query parameters to the report parameters.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gave" <vasgabriel@.gmail.com> wrote in message
news:1135268131.600774.291770@.g14g2000cwa.googlegroups.com...
> Bruce Thanks for the immediate reply. I'm using RS 2000 with Visual
> Studio 2003. When I create the query, like this:
> Select ...
>>From ....
> Where (fieldName between ? and ?)
> The report designer creates two parameters named 'Parameter1' and
> 'Parameter2'. You said that I need to map the parameter on parameters
> tab. But I don't find where I can do that. Where I can map the
> parameters? The only thing that I can do is go to layout and change the
> parameter name on Report parameter menu. But I get the error:
> The value expression for the query parameter '?' refers to a
> non-existing report parameter 'Parameter1'.
> Could you please be more explicit?
> Thanks again.
>|||Thank you Bruce!
I resolved my problem.
No comments:
Post a Comment