SSRS to.Xl Action

thayduck
thayduck used Ask the Experts™
on
I have a textbox. In the textbox properties called Action  > Go to URL I put the below URL:

http://sqluatrs01.cn.ca/Reports/Pages/Report.aspx?ItemPath=%2fAGILERPTS%2fRMREPORTS%2fAREscalationXLTabs&Header1=@Header1&Header2=@Header2&BusinessUnit=@BusinessUnit&CreditStatus=@CreditStatus&SalesDirector=@SalesDirector&Header3=@Header3&AccountMgr=@AccountMgr&OwnerCategory=@OwnerCategory&Team=@Team&Owner=@Owner&PortfolioMgr=@PortfolioMgr&SalesArea=@SalesArea&CustomerType=@CustomerType&DisputeStatus=@DisputeStatus&CCIDSearch=@CCIDSearch&EscalationDays=@EscalationDays&CustNamesSearch=@CustNamesSearch&Custnames=@CustNames%3AFormat=XML

I am passing 18 parameters and want .RDL called AREscalationXLTabs to execute and create a .XL document.
I assume it will ask users where to out the .XL then process and put results there. I do not want the report to display.

Am I doing this correctly and is the URL correct to create a .XL document.

When I execute the above URL, the SSRS report AREscalationXLTabs displays waiting for me to key in parameters information which I already did.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
Hi thayduck,

The path you have used is the path of report manager url. Instead of it use the Url of Web Service Url. You can find the same from your SSRS report Configuration. Refer below scree shot.

2016-01-11_11-15-09.png
Now.

Generate the url as per that. And pass parameter as you did earlier. To have the particular output format. Add parameter in the url like

&rs:Format=PDF or XML if you want in that.

To get the exact url of the report. You can simply go the Web service url of SSRS. Locate that report click on it you will have the Report url. Modify the url as you want.

Hope it will help.
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
What are the multi value  parameters?
thayduckProgrammer Analyst

Author

Commented:
The are all Multiple Values except @Header1, @Header2, @Header3, @CCIDSearch and @CustNames.
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
If you need to pass value for multi value parameter you have to code like below.

E.g. I have year as a multi value parameter and want to pass two values if should me like

&Year=2005&Year=2007
thayduckProgrammer Analyst

Author

Commented:
Wait, I don't know what the user chooses in the multi value parameters. It could be many combinations of different choices. You mean I cannot send the multi select parameter as @BusinessUnit  or @CreditStatus  in the URL ?
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
You can pass the multiple values on the action of text box to sub report.

But please check Parameter configuration for the report you are calling from URL.

It must be configured as "Allow Multiple Values"
thayduckProgrammer Analyst

Author

Commented:
They are all configured to allow multiple values.

Not one of the parameter values is being passed. Even when I hard code something in the URL for one of the none multi value parameters. Nothing..
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
Can you please post a screenshot ?
thayduckProgrammer Analyst

Author

Commented:
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
You are calling other report url when user click on text box. So i think you have configured the Action for Text box lie "Go To url" .

If it is so.

You can not directly Pass the multiple value the sub report for Go to Url like Action.

You have to configure the Expression Property.

Go to Property of Text box -> Action -> Select Go To URL

Click on "fx" not set the url for that action. I took an example only for BusinessUnit Parameter.

="http://sqluatrs01.cn.ca/ReportServer/Pages/ReportViewer.aspx?%2fAGILERPTS%2fRMREPORTS%2fAREscalationXLTabs&rs:Command=Render&Header1=@Header1&Header2=@Header2&BusinessUnit ="&join(Parameters!Year.Value,"&BusinessUnit =")
thayduckProgrammer Analyst

Author

Commented:
How would you URL look if you we added one more multi value parm to it  ?
 I am a little confused by the "


What about non multi value parms  ?
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
Hi,

To explain you more clear. I took two multi value parameter and one non multi value parm.

1) BusinessUnit  - > Multi Value
2) OwnerCategory -> Multi Value
3) @CCIDSearch -> Single value
4) @Header1 -> Single value
5) @Header2 -> Single value

Now for all above params you have to build your url like below.
You can do it for rest of parameters.
="http://sqluatrs01.cn.ca/ReportServer/Pages/ReportViewer.aspx?/AGILERPTS/RMREPORTS/AREscalationXLTabs&rs:Command=Render&Header1=" + Parameters!Header1.Value +"&Header2="+Parameters!Header2.Value+"&CCIDSearch="+Parameters!CCIDSearch.Value+"&BusinessUnit="+join(Parameters!BusinessUnit.Value,"&BusinessUnit=")+"&OwnerCategory="+JOIN(Parameters!OwnerCategory.Value,"&OwnerCategory=")

Open in new window

thayduckProgrammer Analyst

Author

Commented:
I got this partially working were I see the parameters being passed in the actually URL that is being created. Problem is, the total length of a IE8 or 9 URL can only be around 2083 chars (from what I read). The one URL that was created (because of so many parameter selections) was way over 2083, so my URL was incomplete.

If there is no way passed this issue,  then I cannot create this URL in my SSRS report and get it to work since I will never know how many parameter choices the user will be choosing when they run the report. And most times, the URL created will be well over 2083.
Business Intelligence Developer and Analyst
Top Expert 2015
Commented:
Yes. URL has some character limitations. We can overcome this by passing the parameter in Post request.

We can achieve this using custom javascript code on the action of Text box. But i am not aware how exactly we can do this. So i searched it out and find one article for the same.

https://direit.wordpress.com/2012/07/24/ssrs-use-custom-javascript-to-call-a-report-in-a-new-tabwindow/


Please try this. Let me know if you have any question. I will try to resolve same.
thayduckProgrammer Analyst

Author

Commented:
According to the URL you gave me, I must make a change to existing SSRS software called ReportingServices.js  :

In order to be able to call a report the way we want it in a new tab using the post method, we need to write our own custom javascript function to do it.  Reporting Services loads ReportingServices.js javascript file at the beginning of each session, so we can add our own function in this file and have it available in the report.  So edit the javascript file to add the function first.

I am not allowed to make such changes.
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
Is it like access permission issue or you can not modify the scripts because it's not allowed?
thayduckProgrammer Analyst

Author

Commented:
Not allowed
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
so in that case we need to think for other alternative.
thayduckProgrammer Analyst

Author

Commented:
Well,  you did come up with a alternative, but I am not allowed to make this change.

So, maybe I will close this question and award you the points.

What do you think ?
Arifhusen AnsariBusiness Intelligence Developer and Analyst
Top Expert 2015

Commented:
Hmm You can do so for this question. I will be looking for solution will message you once i will get the solutions.

Thanks
thayduckProgrammer Analyst

Author

Commented:
Let me talk to our SQL people and see if they can work with us to make that change to ReportingServices.js  in a test system.
thayduckProgrammer Analyst

Author

Commented:
Thanks for the suggestions.
If you come up with another solution let me know.
I will talk to our SQL team about your solution and see if they will allow me to try it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial