I need to know the shortest path to create HTML reports directly from SQL Server stored procedures. I would prefer not to involve too many technologies and layers between the two.
I have looked into web applications and SSRS (SQL Server Reporting Services), but wanted to know if there are other quicker alternatives out there that I am not aware of. The Idea is to quickly get an html table report from the database.
Two more features that will be great to have are:
To be able to schedule the reports to run (say, weekly).
And to email the URL of the report to the email addresses listed in a column of the report.
Any ideas on how can this be achieved?
Thanks.
Related
We having SQL Server Management Studio , we had written several stored procedures in it. Currently we taking output in HTML and mailing to desired email id's. Now our requirement is instead of HTML we need to take output in excel and mail to desired Id's.
I would use the SQL Server Reporting services, and add subscriptions that send the created result by email as an Excel or CSV file.
Excellent question.
As Michael mentioned, you may use SQL Server Reporting Services (SSRS) to create a report that automatically sends the excel file to your chosen subscribers.
This might be an ideal solution if:
Your business unit would like the report to have specific fonts, color schemes, and column formatting as this is a user-friendly way to format the report and test as needed prior to adding on the email subscriptions. Of course, this depends on your audience and the way that the excel file might be used.
You have support analysts or specialists on your team that have been granted access to SSRS, but not necessarily SQL Server Management Studio. From my experience, granting access to one but not the other may lessen the liability of stored procedures or tables being written over, deleted, executed improperly, etc.
Your business unit frequently has changes to the subscription list, as you would be able to hand the responsibility of editing the list over to designated user-support team members rather than bogging down your SQL Developers.
However, if you'd prefer to create a stored procedure to send the emails or don’t have access to SSRS, then you should be able to use the Bulk Copy Program (BCP) command-line utility to generate a simple CSV file. Here are a couple of resources that provide further detail on this option:
https://www.red-gate.com/simple-talk/sql/database-administration/creating-csv-files-using-bcp-and-stored-procedures/
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/453c9593-a689-4f7e-8364-fa998e266363/how-to-export-sql-data-to-excel-spreadsheet-using-sql-query?forum=transactsql
If you have any further questions, please don’t hesitate to reach out! I’m always happy to help whenever I’m able.
We are using the IBM Cognos Report Studio for Making the Reports.
And we have 1000s of reports developed and using.
Now i need to fetch all the SQL queries written in these 1000+ reports.
For that at present i am opening the report studio for each individual report and getting the query.
But it is very tedious job and taking months to get all the SQLs in these 1000+ reports.
So i am looking for a way to get all these queries from database behind Cognos studio.
Does these report parameters (including the SQL) store in a Database or only in Contentstore?
If it store in DB then is it possible to access the Report Studio in a Database tool like Oracle SQL Developer?
So that i can fetch all the SQLs in one shot from the database table.
Thanks for the help!
My experience migrating from one reporting product to another is like what you are asking. I think I had 7000 reports that I was aware of plus many reports sitting on workstation hard drives. At some point along the way we realized that the new product had different features than the old one, so report redesign was a good option in most cases. It took 18 months once we actually started working on the reports. That was to replace the 700 "standard" reports. Users were on their own (with support from IT and subject matter experts) for their custom work. I now have about 19,000 reports in Cognos.
Except where the report developer wrote SQL in a SQL object in the Queries area, Cognos reports do not contain SQL code. Cognos generates the SQL at runtime based on the report spec and user interaction (what parameters they set, what page the opened, etc.). Short of writing your own report spec parser, duplicating the work that Cognos does for you, there is no way I know of to generate the SQL.
One possibility: I haven't dug too deeply into the Cognos SDK. There may be a method there to generate the SQL for each report. Then you can do it automatically. Be aware that for thousands of reports you'll want to run this process during non-work hours. It could run for hours and may use a lot of resources.
Another possibility: Turn on native query logging (Cognos Administration | System | All dispatchers | | Set properties | Settings | Logging | Check the boxes for "Audit the native query..."). Then have a person, a product like those from Motio, or a Cognos SDK program you create yourself run every report. Then you can get the SQL from the Audit database. Of course, the problem here is answering prompts. It will probably take a person to run these.
To add two columns to a list, or two data elements to a report or page header or footer, or two filters (I don't know what you mean by "clause"), you'll want to use the Cognos SDK.
Choose relevant examples of different types of reports.
Examine the XML report spec for each of those reports.
Determine how to identify where the new element should appear in the XML.
Write a program (probably in C# or Java) to use the SDK to...
inspect every report in your environment.
determine which pattern the report fits.
add the data elements.
save the report.
Does anyone have experience building database reports - doesn't matter which database - i just want design ideas - for a system that is made up of many separate, but identical databases?
I cannot "combine" all databases into one. They must be separate.
But the structure is identical across all databases...
I need to build a web interface that will allow a user to get a "global" report that will query all databases and build one combined report.
Do you have any comments on how the model would look like? or anything you think i need to beware of?
Thanks.
I don't have first hand experience with cross database reports, my experience comes from a product the company i work for sells which can create reports from multiple databases, from your description i believe you require something of the "combine" tables kind, in this case i recommend you to detect the tables used in the query, and unify them in a single temporary intermediary database, for example Access, SQL Server CE or SQLite and then run the query against this temporary database or table.
If your databases are Microsoft SQL Server, then using SQL Server Reporting Services seems like a good solution. The software for the report generation / display is bundled along with the database software.
It gives you a web interface, where you can configure 'data sources' from any number of remote databases, and combine data from these sources into reports. It is user friendly and you can do all the report design / configuration through the web interface without having to write any code.
some references :
Building report using SQL Server stored procedure
http://blog.hoegaerden.be/2009/11/10/reporting-on-data-from-stored-procedures-part-1/
I am currently looking into developing and designing the Report service system for work. My user does not seem to have access to Report Builder etc. I have given access to the below roles, but all I can seem to do is view report, create new folders and upload.
Browser
Content Manager
My Reports
Publisher
Report Builder
Does anyone know what I need to do to resolve this?
Thanks
Have you tried following the instructions on MSDN?
(These are the instructions for SQL 2008- I think the process for SQL 2005 is similar but may differ slightly)
we are trying to create reports programmatically in asp.net using microsoft reporting services. We are not sure if it is possible though. We have several queries for our reports. Instead of creating a separate .rdlc report for each of those queries, we are looking for a way so that we can feed the query / stored procedure to the reporting services engine and the reporting services engine will create a report and display it on the web. Is that possible?
Thanks
Not the way you are describing it.
Reporting services needs a report definition to generate the report (the .rdlc). It can't just guess. You can create the definition programmatically. After all, the .rdlc is just XML in the form of the report definition language schema.
You could loop through the result set, creating new report table columns for each column in the result set or something like that. I've never tried this, but I think it will be damn near impossible to get reliable formatting if the columns, sizes, etc are not known ahead of time. I don't know how many different queries you are talking about, but the effort to do something like this may not be worth it.
Are these queries radically different? Do they return the same basic type of data?