Showing posts with label parameters. Show all posts
Showing posts with label parameters. Show all posts

Friday, March 30, 2012

Remove header using URL access

I have a report that has parameters. The report is called from a webpage using URL access. I know how to remove the toolbar or parameters with "&rc:Toolbar=false or &rcStick out tonguearameters=false". I want to remove only the header which displays SQL Server Report Services, the folder it is found in, the report name, Home | My Subscription | Help , Search for box, and the tabs (View, Properties, History, and Subscriptions). I cannot find an URL access parameter that will only remove this header information. I want to keep the parameter box and the toolbar. Does anyone have any ideas on the subject?

Fred

For this type of customization of report manager, you will probably need to create your own application in Visual Studio 2005 and use a report viewer.

Report manager is not very customizable.

|||

How difficult would it be to write a program to display the parameters like Reporting Services does and to use the selected parameter to refresh the report like Reporting Services does? Any samples?

Fred

|||

You can do this by linking to the report via the reportserver virtual directory rather than the report manager.

Try navigating to http://<your_server>/reportserver and then click through to your report. You will see that the report parameters and toolbar are still visible. Copy the URL and get your application to link to that instead.

|||

Adam,

Yes, this displays the parameters and toolbar, but it also displays the header information which is above the parameter section. I do not want my endusers to see this information ( as mentioned in the first post in this series). This information allows the user to navigate Report Manager which will confuse them. I only want them to see the report with the parameters and toolbar.

Fred

|||

Fred,

Can I suggest that you actually try the solution or read the post properly before commenting!

My suggestetion is based on a live system and I assure you it delivers exactly what you have desribed.

When I navigate to my report using the following URL https://servername/reportserver?%2fReports%2fReport+1&rs:Command=Render

I see this:

If I add &rc: parameters=collapsed to the URL I get this:

I popup my window from a piece of javascript where I use the following code:

Code Snippet

function openReport(name, parameters)

{

if(typeof(parameters) == "undefined") parameters = "";

var encodedName = name;

while(encodedName.indexOf(" ") != -1)

{

encodedName = encodedName.replace(" ", "+");

}

encodedName = escape(encodedName);

var URL = "/reportserver?%2fReports%2f"
+ encodedName
+ "&rs:Command=Render&rc:parameters=collapsed"
+ parameters;

var features = "resizable=yes"
+ ",location=no"
+ ",menubar=no"
+ ",status=no"
+ ",toolbar=no"
+ ",width=" + screen.width
+ ",height=" + screen.height
+ ",top=0"
+ ",left=0";


window.open(URL, "", features).focus();

return true;

}

|||

Adam,

I apologize. I did not read your post correctly. I was using Report Manager and navigated to my report from the home page. Once I used the ReportServer directory I saw that it was exactly what I wanted.

Thank you,

Fred

Remove header using URL access

I have a report that has parameters. The report is called from a webpage using URL access. I know how to remove the toolbar or parameters with "&rc:Toolbar=false or &rcStick out tonguearameters=false". I want to remove only the header which displays SQL Server Report Services, the folder it is found in, the report name, Home | My Subscription | Help , Search for box, and the tabs (View, Properties, History, and Subscriptions). I cannot find an URL access parameter that will only remove this header information. I want to keep the parameter box and the toolbar. Does anyone have any ideas on the subject?

Fred

For this type of customization of report manager, you will probably need to create your own application in Visual Studio 2005 and use a report viewer.

Report manager is not very customizable.

|||

How difficult would it be to write a program to display the parameters like Reporting Services does and to use the selected parameter to refresh the report like Reporting Services does? Any samples?

Fred

|||

You can do this by linking to the report via the reportserver virtual directory rather than the report manager.

Try navigating to http://<your_server>/reportserver and then click through to your report. You will see that the report parameters and toolbar are still visible. Copy the URL and get your application to link to that instead.

|||

Adam,

Yes, this displays the parameters and toolbar, but it also displays the header information which is above the parameter section. I do not want my endusers to see this information ( as mentioned in the first post in this series). This information allows the user to navigate Report Manager which will confuse them. I only want them to see the report with the parameters and toolbar.

Fred

|||

Fred,

Can I suggest that you actually try the solution or read the post properly before commenting!

My suggestetion is based on a live system and I assure you it delivers exactly what you have desribed.

When I navigate to my report using the following URL https://servername/reportserver?%2fReports%2fReport+1&rs:Command=Render

I see this:

If I add &rc: parameters=collapsed to the URL I get this:

I popup my window from a piece of javascript where I use the following code:

Code Snippet

function openReport(name, parameters)

{

if(typeof(parameters) == "undefined") parameters = "";

var encodedName = name;

while(encodedName.indexOf(" ") != -1)

{

encodedName = encodedName.replace(" ", "+");

}

encodedName = escape(encodedName);

var URL = "/reportserver?%2fReports%2f"
+ encodedName
+ "&rs:Command=Render&rc:parameters=collapsed"
+ parameters;

var features = "resizable=yes"
+ ",location=no"
+ ",menubar=no"
+ ",status=no"
+ ",toolbar=no"
+ ",width=" + screen.width
+ ",height=" + screen.height
+ ",top=0"
+ ",left=0";


window.open(URL, "", features).focus();

return true;

}

|||

Adam,

I apologize. I did not read your post correctly. I was using Report Manager and navigated to my report from the home page. Once I used the ReportServer directory I saw that it was exactly what I wanted.

Thank you,

Fred

sql

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 "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?