Showing posts with label header. Show all posts
Showing posts with label header. Show all posts

Monday, March 26, 2012

If all values of dropdown parameter are selected - show ALL in report header

Hi,
I have dropdown parameter with multi-values allowed.
In my report headed I want to show all the dropdown values that were checked by the user to run the report. But since there could be a couple of hundred values I want to show ALL when all the values are selected instead of listing them one by one.
How can I do that?
Thanks,

Igor

Igor,

I recently had a similiar problem. While I'm sure that there is a more elegant solution, this seemed to work for me:

In the textbox where you are displaying the selected parameters you can write an expression that compares the selected item count from the parameter dropdown to the total count of the dropdowns data source.

For example, if you have a multi value parameter called Parm1 and it has a datasourse called Query1 (which selects a KeyID and TextValue) then the expression in your textbox might look something like:

=iif(Parameters!Parm1.Count = count(Fields!KeyID.Value, "Query1"),"All", join(Parameters!Parm1.Label,", "))

This above expression should display the word "All" if all values are seleted from the parameter drop down, otherwise it will list out the selected parameters individually.

Hope this helps.

|||

Hi,

I am getting error,Fields cannot be used on Header and footer.

Any work around.

Thanks

sql

If all values of dropdown parameter are selected - show ALL in report header

Hi,
I have dropdown parameter with multi-values allowed.
In my report headed I want to show all the dropdown values that were checked by the user to run the report. But since there could be a couple of hundred values I want to show ALL when all the values are selected instead of listing them one by one.
How can I do that?
Thanks,

Igor

Igor,

I recently had a similiar problem. While I'm sure that there is a more elegant solution, this seemed to work for me:

In the textbox where you are displaying the selected parameters you can write an expression that compares the selected item count from the parameter dropdown to the total count of the dropdowns data source.

For example, if you have a multi value parameter called Parm1 and it has a datasourse called Query1 (which selects a KeyID and TextValue) then the expression in your textbox might look something like:

=iif(Parameters!Parm1.Count = count(Fields!KeyID.Value, "Query1"),"All", join(Parameters!Parm1.Label,", "))

This above expression should display the word "All" if all values are seleted from the parameter drop down, otherwise it will list out the selected parameters individually.

Hope this helps.

|||

Hi,

I am getting error,Fields cannot be used on Header and footer.

Any work around.

Thanks

Wednesday, March 21, 2012

Identy Number

I am using an Identy number to generate a Unique ID for records.
The process is
a. Save header record (identy ID created)
b. Retrieve Identy No using a select statement via odbc
c. Dave many data recors with Identy Number as reference to the Header
Record.
How can i retrieve the Identy No with a select statement.
Regards
Jeff
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 10/02/2004Use the SCOPE_IDENTITY() function.
--
David Portas
SQL Server MVP
--|||To expand David's response... Use a select that returns the identity ie
select @.@.scope_identity
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.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
"Jeff Williams" <jeff.williams@.hardsoft.com.au> wrote in message
news:OHc5aqz8DHA.2308@.TK2MSFTNGP11.phx.gbl...
> I am using an Identy number to generate a Unique ID for records.
> The process is
> a. Save header record (identy ID created)
> b. Retrieve Identy No using a select statement via odbc
> c. Dave many data recors with Identy Number as reference to the Header
> Record.
> How can i retrieve the Identy No with a select statement.
> Regards
> Jeff
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.583 / Virus Database: 369 - Release Date: 10/02/2004
>

Identy Number

I am using an Identy number to generate a Unique ID for records.
The process is
a. Save header record (identy ID created)
b. Retrieve Identy No using a select statement via odbc
c. Dave many data recors with Identy Number as reference to the Header
Record.
How can i retrieve the Identy No with a select statement.
Regards
Jeff
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.583 / Virus Database: 369 - Release Date: 10/02/2004Use the SCOPE_IDENTITY() function.
David Portas
SQL Server MVP
--|||To expand David's response... Use a select that returns the identity ie
select @.@.scope_identity
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.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
"Jeff Williams" <jeff.williams@.hardsoft.com.au> wrote in message
news:OHc5aqz8DHA.2308@.TK2MSFTNGP11.phx.gbl...
> I am using an Identy number to generate a Unique ID for records.
> The process is
> a. Save header record (identy ID created)
> b. Retrieve Identy No using a select statement via odbc
> c. Dave many data recors with Identy Number as reference to the Header
> Record.
> How can i retrieve the Identy No with a select statement.
> Regards
> Jeff
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.583 / Virus Database: 369 - Release Date: 10/02/2004
>sql