I am new to SSRS. I use SSRS to access a remote data source. I can use the interface shown below to build and execute queries and produce reports:
Is there a way to build a report by specifying the SQL directly rather than using the graphical tools. I have spent some time Googling this and I have gone through a few tutorials. I am unable to find an answer.
Click the Edit as Text button in the top left-hand corner of that window and have at it.
Edit If you are only seeing XML in the query window, then you are using a Report Model data source instead of a direct database connection. Models cannot be queried directly with SQL.
In order to query with SQL, setup a Data Source using a connection string that points directly your database.
Related
I developed a report using the getdaye() function in the query. The report runs fine on SQL management Studio.
I created a report using the SQL server data tool and the report is based on the query that I wrote in SQL studio. I have established a connection using the data source and am able to connect to the SQL database. When I run the report using the tool after a couple of days the report data is different from the data that I get when I run the query using SQL management studio. Obviously the Getdate() is not fetching the right date.
The report data maches only when I copy and paste the query in the SQL server data tool and then run the report.
Am I doing anything wrong or should I use create a parameter for the date and direct the default values = Now() on the sql server data tool.
Is there any other work around for this.
Hem
I guess that did not publish the report to a Report Server but repeat to preview the result in Visual Studio (SSDT). SSDT caches data to improve the experience in SSDT and retrieves data from the database only when needed. "Needed" means that you either change the query or choose different parameters. You could of course pass a parameter to the database server, but if you don't want that, you will have to clear the cache from time to time. Look into the folder where the report is saved and delete the *.data file with the same name as the report. You can make this task very easy by adding a menu command to the tools menu as described here.
I am trying to use SSRS in a multi-tenant situation. The base version we want to support is SQL Server 2008 but if R2 is needed we might be ok with that.
I am currently using the ReportingService2005.asmx endpoint which seems to expose the ReportService2005SoapClient class (even though all samples seem to show ReportingService2005 class).
When we run a report I want to make a copy of that report from the server, add an embedded datasource, point the datasets to that datasource and then run the report.
I have gotten as far as:
getting the RDL from the server
modifying the XML to add the DataSource
pointing the datasets to point to the new datasource
...but when I try to "CreateReport" I get the following error:
System.Web.Services.Protocols.SoapException: The dataset ‘DataSet1’ refers to the data source “mydatasource_LOCAL”, which does not exist.
at Microsoft.ReportingServices.Library.ReportingService2005Impl.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService2005.ExecuteBatch()
I have added the dataset to the RDL, it looks the same as when I add one in the designer. However, I assume something needs to be added to the server? What am I missing?
(As an aside, I know MS Dynamics enabled multi-tennant SSRS in a single instance, but I see no info on how they did it. If they have any code or anything they share someone could point me to that would be awesome.)
You're using the correct endpoint, more or less. From MSDN:
The ReportService2005 and ReportService2006 endpoints are deprecated in SQL Server 2008 R2. The ReportService2010 endpoint includes the functionalities of both endpoints and contains additional management features.
In any case, you mention you modify the RDL to use a new data source in step 2. I might be wrong, but I think you probably still need to add a DataSource item to your report catalog using the ReportingService2010 CreateDataSource(...) method.
If you deploy a new report from Visual Studio to report server it wil also mention in the log that it's deploying the data source before it deploys the report.
Of course you could also create that data source on the server beforehand, using the report manager (though "mydatasource_LOCAL" may not be an ideal name).
I am trying to link a sharepoint list to another using sql server database. The ideal would be for this is to a live link so that when data in the sharepoint list is updated, the data in the sql server database is also updated. The reason that I need to do this is that I have an ASP page which will query the SQL database and display the results on a web page.
Any guidance would be much appreciated
Thanks in advance
SidJ
PS : I have done this in access before using the External Data tab ->
More -> Sharepoint List and then following the steps in the wizard, so
I know it is possible. Just not sure how to recreate this using SQL
Server as the destination for the data.
You can go BCS (Business Connectivity Services) or build something custom using a connector like http://www.bendsoft.com/net-sharepoint-connector/
Here is a small guide on BCS http://zimmergren.net/technical/sp-2010-programmatically-work-with-external-lists-bcs-in-sharepoint-2010
Is it possible to get the view creation statement writing any query in sql sever 2008
Actually i want to copy the views from one database to another database
thanks
Do you have SSMS? You have the option to generate scripts for all objects in a database. You can limit it to just the views.
Right click on the node for the specific database in Object Explorer.
Select Tasks
Under Tasks, select Generate Scripts
Execute the wizard, selecting the options suited for your task.
This will generate a script for all your views, or allow you to select the specific views you're interested in.
#Sashenka's answer is correct, but this will let you script more than one view at a time.
In SSMS,
Right click the view
Select Script view as
Select CREATE To
Choose New Query Editor Window
You can then copy the script and modify it for your new Database.
Easiest way is to use SQL Compare, but you can also do this in SQL Server Management Studio in a similar fashion to what I describe in this blog post.
In short, open object explorer details, multiselect all your views, and script as Drop and Create from the context menu. You can now apply this script on your second server.
I'm having trouble figuring this out.
I stopped ALL of local SQL Services, e.g. SQL Server, SQL Agent, Reporting Services. Then using Report Builder 2.0 to create a report connecting to a remote SQL Server (No SSRS running) out in the farm. When I click on "Run" button, for some odd reasons, it still render the report.
I thought you must have SSRS running in the first place. Is SQL Reporting Services even required for Report Builder?
Img
alt text http://www.freeimagehosting.net/image.php?0bf8bb1f1d.jpg
When Reporting Services runs a report, it creates a data file of the data used in the report and, if nothing changes, it uses that data the next time the report runs instead of hitting the server again. You could be seeing the cached data.
Look where the report is kept. There will be a report file, say MyReport.rdl and also the data, MyReport.rdl.data. You could delete that data file otherwise simply changing the report parameters (if you have some) will generally cause the report to disregard the cached data and make a trip to the server again.
I'm answering my own question. Here's my observation after some googling and experimenting.
Report Builder is using a stand alone report control to render report. Visual Studio.NET is probably using the same thing when preview a report. SSRS is required when developers need to incorporate web-based reporting solution, e.g. ASP.NET, as well as to manage reports.
What's really bothering me is that to author reports in VS.NET, I must be using Business Intelligence Projects. In order to do that, I must install SQL Server 2005/2008 with SSRS. Why is so when SSRS is not even required in a LOCAL environment?