Custom Code and Parameters in SSRS - sql-server-2008

I am trying to use the custom code option to pull down the querystring and set the parameters for the report all in the custom code. So I may have a url such as:
http://mywebsite.com/index.aspx?ProjectID=1
I would want the code in the SSRS custom code to pull down that 1 and put it in the parameters for the report. So when I run the report it shows the data with the ProjectID of 1.
Is this possible to do in Reporting services? If so, how would one go about doing this. Thanks for any help I have seriously been trying to figure this our for weeks.
Thanks!

SSRS can parse a parameter value from the URL as long as it's in the format parameter=value. See this msdn article
The sample URL in your question doesn't look like a report server URL, so (like bhupendra indicates) it's hard to know exactly what you're doing.

Related

Drill through in SSRS in Report Server using the expressions

I've my reports previously on SharePoint site.
I recently deployed my reports to the Report Server.
In the reports there're expressions on the URL Actions part in Text Box properties where expressions have been applied based on the parameters values.
After deploying my reports to the report server and clicking on one of the value where actions have been applied i get the error.
Error:
The item 'BC/Report/get.rdl' cannot be found. (rsItemNotFound)
I've tried placing the link of the report directly in the expressions but that's not working either. I think there needs some review in the expression.
Expressions looks like this:
= IIF(Parameters!ForEmail.Value <>
TRUE,Globals!ReportServerUrl,Parameters!ReportURLSub.Value) & "?" &
Globals!ReportFolder & "/get.rdl"
Thank you in Advance and sorry if explanation is not enough.
did you tried static url per hand in browser? does it work.
If yes try adding this parameters as Parameters!ReportURLSub.Value) in Textbox and see if it results desired result.
Also check if Globals!ReportServerUrl returns correct value
If yes can create this url whith your parameters in a Textbook static and see what result you get.
If all these steps pass then move to your last step, creating as a Action.

Running SSRS Report by passing parameters in the URL doesn't show any result of the report

I'm trying to run an SSRS report on the server which takes a parameter as input. When I enter input in the textbox it displays the result. Also works fine in the visual studio BIDS.
But, I want to pass parameter in the URL and see the report result which is not working.
I have seen solutions to other similar SO posts SSRS passing Report Parameters
which mentioned checking the dataset parameters properties.
My parameter name is #TestId and value is set to =Parameters!TestId.Value
So, it is correct as suggested in the solution.
Now I try o access my report using URL patterns as below
Just giving parameter and value
http://testssrs14/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fTest%2fTestReport%2fTest+Report&TestId=1234
using command = render
http://testssrs/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fTest%2fTestReport%2fTest+Report&rs:Command=Render&TestId=1234
when I hit enter it doesn't throw any error in both cases but just shows a blank page instead of the result of the report. Is there anything I'm missing?
Please use this URL instead and try
http://testssrs14/ReportServer/
And navigate to the report that you're looking for.
When you get to the report page, then pass the parameter value.
&<Parameter Name> = <value>
In your case
&TestId=1234
Add this at the end of the URL.
Let me know if you need any further clarification.
Based on your comments, Here's some detail.. though I guess it must be figured out as of now..
Here goes the report server:
and below goes the Report Manager..
and in VS Data Tools or BIDS, the same is set as in Projects->Properties below
So, you got to try your URL parameters in ReportServer, not in Report Manager.
What you had been accessing so far is Report Manager..
Hope it makes some sense, now : ) ,
Thus, your link should be something like http://testssrs14/Reportserver/..
This link is also a good source!

How to Calculate IRR in SSRS reports dynamically

Can you please let me know that how we can write code for irr calculation in SSRS Reports.
IRR basically requires two parameters i.e. Payments array and guess value.
But i don't know how to build array dynamically in SSRS reports.
you have to write the custom code for that, please refer to following link that definitely help to get it done
How to use the IRR function

CRM 2011 Passing QueryString to SSRS Report

I have a report in SSRS that I have in Dynamics CRM 2011 and when the report is run, in the url it passes the id like http://url&id=123-123-123-123. I am trying to make my report in ssrs to grab the id from the query string and use that in the parameters to determine which data to show. Is this possible and if so how would one go about doing it.
Thanks!
CRM actually sends a parameter which can be used to select the filtered view of data that the report was run on. See the report writers guide, and in particular, Using Filters in a Report.
In the simplest case, you would write your main data set to select like so: SELECT <column1>, <column2>, <columnN> FROM FilteredAccount AS CRMAF_FilteredAccount
If that doesn't answer answer your question... You could write an aspx page which embeds the report viewer control. From there you would read the query string, load the report, and then set some parameters based on the query string values. You'd have to have custom ribbon options to launch your custom page.
I had the same problem.
Here is the resolution which worked for me:

I want to display a report on a web page The report needs a single parameter (prompt, possibly)

I want to display a Microstrategy report on a web page The report needs a single parameter
I have a report that has a (local) filter which I'd like to able to parameterize. Not the whole filter string but just the numeric value that the report filters on.
I know that I can use a prompt to put a value into a report, but I need to do this from an HTML document which, I understand, can't be done with a prompt.
Is there another way to do pass a parameter from an HTML document into the filter of report in the HTML document?
Kind Regards,
Barrie
If you're using a URL to the report, you can pass a prompt answer in as a parameter, specifically valuePromptAnswers.
TN15734 on the MicroStrategy Knowledgebase gives a full example, if that isn't clear enough.