Generate report from URL - SQL Server Reporting Services 2008 - sql

I have SQL Server Reporting Services 2008 and when I open the following URL:
"http://localhost/Reports/Pages/Report.aspx?someReport"
I'm getting report screen in which I fill my parameters and generate a report,
My question is how can I do this without any GUI? by batch file or C# script..
Thanks in advance.
=========================================================================
EDIT:
Thanks to all answer above I succeed to generate a report and save it as an XML using the following link:
"http://Server/ReportServer/Pages/ReportViewer.aspx?someReport&dFrom=01/01/2012&dTo=08/08/2012&rs%3AFormat=XML"
Thanks for you all!!!

Your problem is you are passing parameters to http://server/reports...
you need to pass parameters to http://server/reportserver...
I remember this issue I had when I first started using Reporting Services.
Here's the MSDN that may help you: http://msdn.microsoft.com/en-us/library/ms155391.aspx
For example, to specify two parameters, “ReportMonth” and “ReportYear”, defined in a
report, use the following URL for a native mode report server:
http://myrshost/ReportServer?/AdventureWorks 2008R2/Employee_Sales_Summary_2008R2&ReportMonth=3&ReportYear=2008
The result is like so:
http://myRSServer/ReportServer/Pages/Report.aspx?%2fDefaultTenant%2fDialing+Reports%2fDialing+Agent+Performance&dFrom=01/01/2012&dTo=08/08/2012
If you want to export the report to excel / pdf / etc you can append it:
For excel: &rs:Format=Excel
For PDF: &rs:Format=PDF
This should help as well: http://www.mssqltips.com/sqlservertip/1336/pass-parameters-and-options-with-a-url-in-sql-reporting-services/

Your second URL option is the closest, you pass the date parameters without quotes. As JonH states you want to use ReportServer instead of Reports, and you also want to remove ItemPath=
http://Server/ReportServer/Pages/Report.aspx?%2fDefaultTenant%2fDialing+Reports%2fDialing+Agent+Performance&dFrom=01/01/2012&dTo=08/08/2012
Additionaly, if you want to export the file you can append &rs:command=render&rs:format=PDF replacing PDF with the format you desire

string URL = "YourReportUrl";
string FullURL = URL + "&JobId=" + JobId.ToString() + "&JobNumber=" + JobNo.ToString() + "&rs%3aCommand=Render";
Where JobId and JobNumber will be your Parameter names.
This will directly open in your report Viewer.
To display in XML format, add this &rs%3AFormat=XML to end of URL.
string FullURL = URL + "&JobId=" + JobId.ToString() + "&JobNumber=" + JobNo.ToString() + "&rs%3aCommand=Render&rs%3AFormat=XML";

Following is an example for using URL for a report. It passes parameters and also specify whether the parameters should be hidden or not
http://myServer/ReportServer/Pages/ReportViewer.aspx?/InventoryTracking/Receiving/InboundContainerID
&rs:Command=Render&rc:Parameters=false&Plant="20"
If are using HTML file to display this, then use
window.location.href = url;

Related

can I get parameters from URL in pentaho?

Can I use a parameter from Carte's URL in a Job? Something like this:
http://localhost:8080/kettle/startJob/?name=myjob&xml=Y&testvar=filename.txt
I want to do this because I have a job to transform an input file but I want to change that filename dynamically, and creating a new XML file for each file is a bit nonsense.
I've tried many things and I couldn't find a solution :-(
All named parameters must be declared in the parameters tab of said JOB and KTR to be executed and receive the information passed from the URL parameters.

SSRS - How to show external image based on URL inside column

I am trying to show images for products inside a basic report. The image needs to be dynamic, meaning the image should change based on the SKU value.
Right now I am inserting an image into a table, setting to external, and i've tried:
=Fields!URL.Value
=http://externalwebservername/sku= & Fields!SKU.Value
="http://externalwebservername/sku=" & Fields!SKU.Value
I do not get any images in my table.
My stored proc has all the data, including a URL with the image I wan't to show. Here is a sample of what the URL looks like:
http://externalwebservername/sku=123456
If I enter the URL in the field without "=" it will show that ONE image only.
How should I set up the expression to properly show the external image based on a dynamic URL? Running SQL 2016
Alan's answer should work, but in our environment we have strict proxy/firewall rules, so the two servers could not contact each other.
Instead we are navigating to the file stored on our storage system.
We altered the URL column to point to file path in the stored procedure. Insert image, set Source to External and Value set to [URL].
URL= file://server\imagepath.jpg
As long as the account executing the report has permissions to access the URLs then your 3rd expression should have worked.
I put together a simple example as follows.
I created a new blank report then added a Data Source. It doesn't matter where this points, we won't use it directly.
Then I created a dataset (Dataset1) with the following SQL to give me list of image names.
SELECT '350x120' AS suffix
UNION SELECT '200x100'
UNION SELECT '500x500'
Actually, these are just parameters for the website http://placehold.it/ which will generate images based on the size you request, but that's not relevant for this exercise.
We'll be showing three images from the following URLs
http://placehold.it/350x120
http://placehold.it/200x100
http://placehold.it/500x500
Next, create a table, I used 3 columns to give me more testing options. Set the DataSetName to DataSet1 if it isn't already.
In the first column the expression is just =Fields!suffix.Value
In the second column I added an image, set it's source property to External and the Value to ="http://placehold.it/" & Fields!suffix.Value
I then added a 3rd column with the same expression as the image Value so I could see what was being used as the image URL. I also added an action that goes to the same URL, just to check the URL did not have any unprintable characters in it that might cause a problem.
The basic report design looks like this.
The rendered result looks like this.

scraping results not limited according to the passed parameters - kimonolabs

i've tried to add the parameters "kimoffset" and "kimlimit" to the source url of my api, but this doesn't limit and/or shift the scraped results
my api's source url:
http://www.tripadvisor.com/Hotels-g187791-Rome_Lazio-Hotels.html?kimlimit=10&kimoffset=100
are these parameter used for this?
why doesn't work?
the results in data preview area are always the same
For some reason the server is ignoring your query string kimlimit=10&kimoffset=100.

How to check the Parameters of an URL using Selenium

I need help in checking the parameters in an url using Selenium Python.
Problem: I had an URL
For Ex: http://www.test.com/hi13docs?layouttype=Hello&env=prod&id=16&sitename=US&vendorid=testing&plid=0ENG&os=windows
The above URL is after redirection. So, i want to check the above parameters like Sitename, id, Vendorid values are correct or not (Provided the above values US, 16, testing are correct).
Any one please help me.
I believe you could use something along the lines of
url = selenium.getLocation();
Then split the string and compare the parameters to what is in the string variable.

insert/read html file from blob field

How can I INSERT and RETRIEVE with SQL language, an HTML document from a BLOB field into db2 on ibmI ??
I put the testing.html inside fylesystem but I don't know if this way is correct or if I can also use a file into my local PC.
I tried this code from STRSQL without success:
INSERT INTO LIB/FILE VALUES('','C','000001',BLOBFROMFILE(/PATH/testing.html))
Is it possible to enter an HTML document type or is there another type field to manage it?
After this procedure I need also a SQL string than can read it.
Thanks!
$data = file_get_contents("/PATH/testing.html");
$data = mysql_real_escape_string($data);
$query = "INSERT INTO FILE VALUES('','C','000001','$data')";
mysql_query($query);
edit:
linux file system
lets assume you are working on /var/www/username/public_html/ folder
when u try /PATH/testing.html
program looking for /PATH/testing.html
direct access to root folder probably u dont have that right
in the other hand when you try PATH/testing.html ( no / at start )
program look for /var/www/username/public_html/PATH/testing.html