all groups > sql server reporting services > july 2005 >
You're in the

sql server reporting services

group:

How to use a dataset field value in a report parameter


How to use a dataset field value in a report parameter Jaime Stuardo
7/1/2005 11:44:02 AM
sql server reporting services:
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
Re: How to use a dataset field value in a report parameter Wayne Snyder
7/3/2005 8:01:10 AM
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

[quoted text, click to view]

Re: How to use a dataset field value in a report parameter Jaime Stuardo
7/4/2005 5:54:07 AM
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

[quoted text, click to view]
AddThis Social Bookmark Button