I want to develop my own Custom Reports in Sql Server. I would want to know the underlying report logic (tables used, joins etc) of the existing Standard reports in SSMS to get an idea. Is it possible to locate the source code (.rdl) of these Standard Reports and get the underlying logic which could be used in my Custom Reports ?
I am using Sql Server 2012
Thanks
SSRS can't use .rdl as data source to retrieve data. For your requirement, you should query the system table to retrieve data into a dataset.
Related
I have a bunch of reports that are using the same shared data source, however we are not wanting to run the same reports off of data on another server. I would like to avoid having to copy all the reports to another instance of SSRS and have the data source be dynamically driven by a parameter.
Is this possible with a shared data source?
Also we are using SQL Server 2012.
Thank you
You can use expressions to build datasource connections but ONLY if the connection is embedded in the report, shared datasources can NOT be dynamic in the same way.
One way around this, but it's messy and not very safe, is to use linked servers and then include the server name in the table references. To do this you would have to use dynamic sql - not pretty if you have large dataset queries.
I have a query which is written in SQL Server and this gives me what I require.
I have a new requirement to add a Sharepoint Data source field on to the same SQL Query and perform some matching against them.
I know how to add a Sharepoint source as a Datasource within SSRS, however not quite sure how this can be implemented within SQL itself?
Note: my front end for the SQL query is SSRS i.e. once all sorted on SQL, I copy across to SSRS and design accordingly.
Retrieving data from Excel to a SQL server database is common.
Let's say I have selected 4 columns of data from Excel and I copyed this data to my Clipboard.
Q: How can I generate a table (temporary or normal) with 4 columns (could be all characters) ?
This kind of thinking is fundamentally flawed. Excel is a client application where the user interface is the application, whereas SQL Server is a server type application, where SQL management studio is provided as a facilitator, not inherent in the application itself.
It is concievably plausible that you could use a CLR stored procedure to access the clipboard but I would advise against it.
I am very new to SQL Server. I am trying to determine the best way to conduct quality control of data stored within a SQL Server 2008 R2 Standard Edition database.
The types of QC tests to be conducted include data integrity, referential integrity, and business logic checks. The output needs to be a table where each record represents a dataset tested and each column represents a test conducted. Depending on the test, values for each column should either be a number representing how many records in the dataset failed, or a list of ID's representing records that failed.
I'm not sure where to begin... Can this be done using simple SQL queries or should this be done using Reporting Services or some other tool provided with SQL Server?
Start by building your queries in SSMS.
Once you get to stable queries, then you could go to SSRS if you want to enhance the presentation and delivery of the data, or to SSIS if you want to automate and flexibility to output to many different systems, or look at a simple SQL Agent job if you just want to copy data to a different table.
SSRS is aimed at read-only access with nice graphical presentation and delivery formats.
SSIS is aimed at flexible data integration tasks, but not much UI.
SSMS is the general purpose SQL server authoring tool. Both SSRS and SSIS can use the SQL you write in SSMS.
(I think this answers your question; Is this what you were looking for?)
I have a bunch of old reports in MS Access that I want to just move over to SQL Server.
Is this possible to do? What steps need to be taken?
Identify a Report to convert
Open the Report in MS Access in Design mode
Get an old copy of the report or run the report out of MS Access (as the basis of making a SSRS report)
Open the Report Properties and find the Record Source the Report is using: qry_Intermediary_Summary
Goto the Queries tab and right click the Query and choose Design View:
Right click and choose SQL View
Copy the MS Access SQL into SQL Management Studio
Edit the MS Access SQL so it is SQL Server compliant:
Escaped column names that are reserved SQL Keywords (eg GROUP)
Replace double quotes with single quotes
Make sure Table/Views exist
Remove Dollar signs
Convert Trim(...) to LTrim(RTrim(...)))
etc
When a Query uses nested queries we need to convert them to Stored Procedures and load the data in Temporary tables. eg
This SQL uses 3 nested queries:
qryTopStocks
qryTopStocksBuys
qryTopStocksSells
We cannot make the queries Functions that return Tables because Functions dont support ORDER BY
We cannot turn the queries into Views because Views do not accept parameters
So we have to convert the queries into Stored Procedures:
Then in our DataSets we execute the Stored Procs into Temporary tables that we can join:
Once you have the Query and it is returning the exact results as MS Access (view the old report to check), then we can create a new report.
I have used the MS Access to SSRS conversion tool. It managed to get the MS Access report designs but couldn't extract data. These SSRS2005 version reports are in directory AAA. Copy the Report you are converting from the AAA folder into the BBB project folder.
Import the old SSRS2005 report into BIDS/SSRS2016:
Select all the controls and copy them onto a new SSRS2016 report. Then delete the SSRS2005 report from the project. You only need it to copy the controls retaining the design, fonts and styles.
In BIDS map all the controls to their field in the DataSet.
UPDATE: I just found this, its quite helpful: https://www.databasejournal.com/features/msaccess/article.php/3705151/Converting-Access-Queries-to-SQL-Server.htm
And this is a really good explanation of MS Access queries vs SQL Server queries for linked dBs
https://www.mssqltips.com/sqlservertip/1482/microsoft-access-pass-through-queries-to-sql-server/