Sunday, February 19, 2012

How to use a dataset field value in a report parameter

Hi all..
How can I use a value of a returning dataset to be the default value for a
parameter?
I tried using =Fields!THE_FIELD.value in Non-queried textbox of the
parameter, but this doesn't seem to work.
When I press the fx button, the text "Report item not linked to database" is
shown in Fields node of the treeview. I don't know if this message has
something to do with it.
Thanks
JaimeYou must use the Queried section... Name the dataset and the field...
However I warn you (as does the documentation) that sometimes using the same
data set for report data and parameters cause (I think the word is )
unspecified behaviours... - problems... be careful..
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Jaime Stuardo" <JaimeStuardo@.discussions.microsoft.com> wrote in message
news:526D3602-02A8-40BB-BD1B-D6222D95D730@.microsoft.com...
> Hi all..
> How can I use a value of a returning dataset to be the default value for a
> parameter?
> I tried using =Fields!THE_FIELD.value in Non-queried textbox of the
> parameter, but this doesn't seem to work.
> When I press the fx button, the text "Report item not linked to database"
> is
> shown in Fields node of the treeview. I don't know if this message has
> something to do with it.
> Thanks
> Jaime|||If itis problematic, what is the best solution for this?:
I have a big query that retrieve some data. To make it simpler to explain,
imagine this simple query:
SELECT IDEPOL, POL_NAME
FROM POLIZA
WHERE [some filter]
I have in report layout a data region that shows POLIZA information.
I need to have another data region associated with this other query:
SELECT MOVEMENT
FROM PRIMA
WHERE IDEPOL = :IDEPOL
Where :IDEPOL is the IDEPOL returned by the first query.
Of course, I have grouped by IDEPOL in layout (using a List control)
I repeat that this is only an example, The true main query is very big, and
I need to have several other data regions whose queries are of the form of:
SELECT MOVEMEN
FRIMA
WHERE IDEPOL = :IDEPOL
So the usage of a lot of joins is discarded.
Thanks in advance for any help you can give me.
Jaim
"Wayne Snyder" wrote:
> You must use the Queried section... Name the dataset and the field...
> However I warn you (as does the documentation) that sometimes using the same
> data set for report data and parameters cause (I think the word is )
> unspecified behaviours... - problems... be careful..
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Jaime Stuardo" <JaimeStuardo@.discussions.microsoft.com> wrote in message
> news:526D3602-02A8-40BB-BD1B-D6222D95D730@.microsoft.com...
> > Hi all..
> >
> > How can I use a value of a returning dataset to be the default value for a
> > parameter?
> >
> > I tried using =Fields!THE_FIELD.value in Non-queried textbox of the
> > parameter, but this doesn't seem to work.
> >
> > When I press the fx button, the text "Report item not linked to database"
> > is
> > shown in Fields node of the treeview. I don't know if this message has
> > something to do with it.
> >
> > Thanks
> > Jaime
>
>

No comments:

Post a Comment