Showing posts with label parameter. Show all posts
Showing posts with label parameter. Show all posts

Wednesday, March 28, 2012

Remove default parameter

I have a report with default parameters set as ' ' i.e a blank value through a query.

when i deploy this report RS2005 adds a <select a value> as the text listed in the dropdown beacuase of which it does not take my default value and no display of report.

How can I remove this text being shown.

Thanks,

Kiran.

Do you have the "allow blank value" property set? Also, is your query set up to return rows if the parameter is nothing?

Simone

|||

Yes the parameter has allow blank value set. and it returns a different table with values if this parameter is kept blank.

Hence i want users to selcet blank if they do not want to consider this parameter and not just leave the parameter value as

<select a value>

Thanks,

Help appreciated.

Kiran

|||

It seems that if you have a list of available values you must also set a default value. I have a case where I allow no value to be selected but have a list of available values when necessary. To handle this I add an "All" option to my available values list and set this as the default. If this is the chosen value, then I return all records. If another value is filtered the recordset is chosen based on the selection.

Simone

|||

Hello,

So what i should do is if I ahve a list of values and a default value set to the parameter I remove teh allow blank value and that would remove the select a value.

would taht be correct?

thanks

|||

Hello,

I have defqault value for the parameter from the list of available values.

Also i have unchecked the allow blank and allow null text boxes. Still tehre is the <select a value> in the parameter drop-down.

What next.

Thanks

|||

In your query that selects the data, do you have anything such as this:

where column = case when @.variable = '' then column else @.variable end


This tells the query to pull all data when the variable value is blank, otherwise pull only the data matching the variable value. You then need to ensure you have '' as a valid choice in the "available values" section.

Simone

|||

Thanks Simone,

I do have conditions like AND @.Country=' ' AND @.Srv_Level=' '

but there is a value in the dropdown that is ' ' which is also set as default value for some of teh parameters.

the difference is that selecting ' ' does not mean that select all values as in the dropdown there is an all functionality too. Selecting a ' ' matches a specific case and gives values returning to that condition.

I am thinking this is a RS2005 addition as in the designer view do not see the <select a value> in teh parameter dropdowns

Thanks

|||

Maybe this will help you:

http://msdn2.microsoft.com/en-us/library/aa337234.aspx

I misunderstood your intentions with the blank value. The same should be true with having the blank value as your default. If it is a valid selection in the list and selected as your default value, so long as all other parameters also have a default value, your report should run. I am using both "ALL" and "" as defaults and do not have the <select a value> in my lists. I have either the "" or "All". Good luck.

Simone

|||I have used 'ALL' and NULL to accomplish this task on reports I have written|||Hi,

Could you elaborate how using Null u manged to remove <select a value> I need a ' ' as a possible selection....
thanks
|||

I am using a SQL statement to return my list of available values. In the statement I add a UNION to include the '' default.

ex.

Code Snippet

Select FieldA

From TableA

UNION

Select '' as FieldA

Order by 1

I then set '' as the default value.

I hope this helps.

Simone

Remove default parameter

I have a report with default parameters set as ' ' i.e a blank value through a query.

when i deploy this report RS2005 adds a <select a value> as the text listed in the dropdown beacuase of which it does not take my default value and no display of report.

How can I remove this text being shown.

Thanks,

Kiran.

Do you have the "allow blank value" property set? Also, is your query set up to return rows if the parameter is nothing?

Simone

|||

Yes the parameter has allow blank value set. and it returns a different table with values if this parameter is kept blank.

Hence i want users to selcet blank if they do not want to consider this parameter and not just leave the parameter value as

<select a value>

Thanks,

Help appreciated.

Kiran

|||

It seems that if you have a list of available values you must also set a default value. I have a case where I allow no value to be selected but have a list of available values when necessary. To handle this I add an "All" option to my available values list and set this as the default. If this is the chosen value, then I return all records. If another value is filtered the recordset is chosen based on the selection.

Simone

|||

Hello,

So what i should do is if I ahve a list of values and a default value set to the parameter I remove teh allow blank value and that would remove the select a value.

would taht be correct?

thanks

|||

Hello,

I have defqault value for the parameter from the list of available values.

Also i have unchecked the allow blank and allow null text boxes. Still tehre is the <select a value> in the parameter drop-down.

What next.

Thanks

|||

In your query that selects the data, do you have anything such as this:

where column = case when @.variable = '' then column else @.variable end


This tells the query to pull all data when the variable value is blank, otherwise pull only the data matching the variable value. You then need to ensure you have '' as a valid choice in the "available values" section.

Simone

|||

Thanks Simone,

I do have conditions like AND @.Country=' ' AND @.Srv_Level=' '

but there is a value in the dropdown that is ' ' which is also set as default value for some of teh parameters.

the difference is that selecting ' ' does not mean that select all values as in the dropdown there is an all functionality too. Selecting a ' ' matches a specific case and gives values returning to that condition.

I am thinking this is a RS2005 addition as in the designer view do not see the <select a value> in teh parameter dropdowns

Thanks

|||

Maybe this will help you:

http://msdn2.microsoft.com/en-us/library/aa337234.aspx

I misunderstood your intentions with the blank value. The same should be true with having the blank value as your default. If it is a valid selection in the list and selected as your default value, so long as all other parameters also have a default value, your report should run. I am using both "ALL" and "" as defaults and do not have the <select a value> in my lists. I have either the "" or "All". Good luck.

Simone

|||I have used 'ALL' and NULL to accomplish this task on reports I have written|||Hi,

Could you elaborate how using Null u manged to remove <select a value> I need a ' ' as a possible selection....
thanks
|||

I am using a SQL statement to return my list of available values. In the statement I add a UNION to include the '' default.

ex.

Code Snippet

Select FieldA

From TableA

UNION

Select '' as FieldA

Order by 1

I then set '' as the default value.

I hope this helps.

Simone

sql

Monday, March 26, 2012

Remove "Select All" Options from Multi Select Parameter Dropdown

Hi All

I am using SQL Server 2005 with SP2. I have multi select parameter in the report. In SP2 reporting services gives Select All option in the drop down.

Is there any way I can remove that option from the list?

Thanks

No you can't remove it. It was removed by the MS team in SP1, but popular demand meant it was reinstated. The only way to get rid of it is to build your own UI.|||

FYI : the story is here

http://blogs.msdn.com/bwelcker/archive/2006/08/14/700189.aspx

and here

http://blogs.msdn.com/bimusings/archive/2007/04/09/the-curious-saga-of-select-all-and-multi-valued-parameters-in-reporting-services.aspx

... note that in the followup comments in the first one, Brian W does note that:

re: Rather Ripped (Select All in Service Pack 1)

Sunday, February 04, 2007 5:49 PM by bwelcker

I understand all of the angst around this decision. We will definitely make this configurable in the future, either on a server level or a per-report level.

... after which somebody responds "I prefer per-server" -- but I personally (LSN) would prefer per-report. So they really can't win, can they <g>. No, seriously, in this case they can't win unless they do both...

>L<

|||

Thanks for the reply everyone.

That answers my question.

Regards

Remove "CONSTRAINED" flag on Paramaters using Graphical Interface

I'm using MS Report Designer 2005.

When I create a parameter using the checkbox in the graphical design mode's filter pane, Report Designer automatically sets the constrained flag, eg:

STRTOMEMBER(@.ToWorkItemSystemId, CONSTRAINED)

How do I remove this? I can't do it in the generated text query because the program only let you edit mdx queries graphically or textually EXCLUSIVELY?

Once you switch to MDX mode, you cannot go back to Designer mode. Or, rather, if you do, your manual changes will be nuked because the designer doesn't support reverse-engineering manual changes.

I am curious though, why would you want to remove the CONSTRAINED flag?

|||

Please disregard. I was getting an error that my Parameters were invalid due to the contrained flag. I've since figured out that they were in the wrong format.

In any case, if a flag set\removed textually, it would be nice if there a way to do the same graphically.

Remove "CONSTRAINED" flag on Paramaters using Graphical Interface

I'm using MS Report Designer 2005.

When I create a parameter using the checkbox in the graphical design mode's filter pane, Report Designer automatically sets the constrained flag, eg:

STRTOMEMBER(@.ToWorkItemSystemId, CONSTRAINED)

How do I remove this? I can't do it in the generated text query because the program only let you edit mdx queries graphically or textually EXCLUSIVELY?

Once you switch to MDX mode, you cannot go back to Designer mode. Or, rather, if you do, your manual changes will be nuked because the designer doesn't support reverse-engineering manual changes.

I am curious though, why would you want to remove the CONSTRAINED flag?

|||

Please disregard. I was getting an error that my Parameters were invalid due to the contrained flag. I've since figured out that they were in the wrong format.

In any case, if a flag set\removed textually, it would be nice if there a way to do the same graphically.

sql

Remove "All" and Keep "select All" from parameters

I know that when you select Multi from the parameter report properties, that it automatically makes "Select All" Available. So how would i take off the "All Value". My users dont want to see All, if Select ALL is available.

How do i exclude from "All" from my report parameter/dataset?

Are you returning "All" from a stored procedure or is it one of your multi value parameter value?

Remove <select a value> option

I have a parameter that get his values from a query.
his defualt value is Null.
In the report page, The first value is "<select a value>".
even if I give the parameter another defualt value Then it open with
this value selected but still the first value is "<select a value>".
Can I remove this?
Thanks.On Feb 25, 12:23 am, "nicknack" <roezo...@.gmail.com> wrote:
> I have a parameter that get his values from a query.
> his defualt value is Null.
> In the report page, The first value is "<select a value>".
> even if I give the parameter another defualt value Then it open with
> this value selected but still the first value is "<select a value>".
> Can I remove this?
> Thanks.
Please refer to the response I posted on the other Reporting Services
group.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||Where is the other reporting services group..I can't find it.
Cheers
D
"EMartinez" wrote:
> On Feb 25, 12:23 am, "nicknack" <roezo...@.gmail.com> wrote:
> > I have a parameter that get his values from a query.
> > his defualt value is Null.
> >
> > In the report page, The first value is "<select a value>".
> > even if I give the parameter another defualt value Then it open with
> > this value selected but still the first value is "<select a value>".
> >
> > Can I remove this?
> >
> > Thanks.
> Please refer to the response I posted on the other Reporting Services
> group.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>

Monday, March 12, 2012

Remote Report Server 2005 using the reportviewer control - parameter problem

I am using an asp.net web page (C#) to access a remote Report Server via the reportviewer contol. After solving the credentials issues, all of my test reports seem to run very nicely if there is no parameter input. When a parameter report is executed, the text box for parameter input is displayed. When the parameter is entered and the View Report button is pressed, the report is NOT Returned. If I go directly to the remote Report Manager and run the report (IE no code behind), it runs as it is supposed to. I've also run the report (web page) on my local report server and it displays the report after the parameter has been input. Why is the remote report server not returning the report after the parameter is input?

Thanks,

John

This problem has been resolved. The page will not work if the "ReportViewer1.ServerReport.ReportServerCredentials = new MyReportServerCredentials();" statement is placed in the Page_Load event.

Here are the steps taken to eliminate the problem:

1. Remove the credentials statement from the Page_Load event.

2. Place this code in the Page_Load event

if (!Page.IsPostBack)
{
ReportViewer1.Visible = false;
}

3. Place a button on the page to display the report.

4. Move all report statements to the push button event. Make sure to include "ReportViewer1.Visible = true"

It now works like a champ and I am happy!

Thanks,

John