What are my options for serving a dynamically generated PDF report as a download from an ASP.NET webserver? - mysql

I'm working on an application that stores a large amount of user-entered data in a MySQL DB regarding their performance in a competitive activity. We have a web interface that provides data visualization in the form of charts and graphs.
We're looking for a way to generate a PDF from a user's data using a provided UserID in our ASP.NET backend that users will be able to download.
The team's current thinking involves using a reporting tool like SSRS, generating the .rdl file from a template using the UserID, rendering the report as a PDF in the backend, and sending it to the user to download.
I'm very unfamiliar with report generation, but the more research I do, the more I wonder if a dynamic SSRS report is the right strategy for what we're trying to accomplish. If I were just doing this myself, I'd probably build a new view of the data using a print css stylesheet, but I'm not sure what the downsides to that strategy would be relative to building a report.

Related

Sharepoint and Database interaction, what should I do?

I've developped a MySQL database containing informations about different documents and products. Now I have to create a user interface which has to be integrated in a sharepoint. As I'm new to sharepoint, I am a bit lost and I don't know what I should choose (developping a Web Application on visual studio which will be hosted on Sharepoint, developping a WebPart...etc I have no idea of what to do).
So my question is : What's the best option to develop this user interface on Sharepoint ?
Thanks
You can go different ways:
Push data from your MySQL database to SharePoint list periodically or event-based.
In this case you already have UI interface of SharePoint list view. If out-of-box UI not enough then you can create your own using javascript or by creating your own web part or by creating SharePoint add-in.
You can do it many ways:
1.1. C# console app (create with Visual Studio). Console app will connect to your SQL database and create list items in SharePoint list. You can schedule this console in Windows Task Scheduler.
1.2. Another periodically running code that external to your database. May be PowerShell script, SharePoint timerjob, Windows service, SharePoint workflow or something else. This code will connect to database and push data to SharePoint list.
1.3. I don't know how you fill your database but in your logic you can add logic to also create SharePoint list item in list when you add record to database.
It is event-based logic.
Get all data from your database in SharePoint on page load each time.
Add some web part to SharePoint that get data from your database on page load (you can mix some parts below to get intented behavior):
2.1. Create your own Visual Web Part in Visual Studio. Deploy solution with web part to SharePoint. Add web part to any page in SharePoint.
This web part will get data from your database on page load.
2.2. You can create web service hosted anywhere (SharePoint, another place) that return data from your database.
Create javascript logic that call this web service to get data and render data.
Add this javascript logic in Content Editor or Script Editor web part in SharePoint. CE and SE web parts is out-of-box web parts, you don't need to develop this.
2.3. Create SharePoint add-in that will get data from web service.
2.4. etc ....
May be I can suggest other options if you specify more precise requirements to implementation.
Just say how you see it in your imagination and I can suggest ways how to implement it.
Describe how it must be from user experience. Like 'I see page where I have three green buttons, color highlighted rows, auto-calculated field and so on and so on. I click button and get following result... ". Describe your expected user experience.
About trends - javascript rules now. In SharePoint Online you cannot create server code solutions hosted in SharePoint.
Best solution to use javascript to not change many things on migration to different version of SharePoint.

Dynamic Report creation

I hope someone here can help.
I have a requirement from my client who is an ISV. They want to develop a solution whereby they want to offer their customer an ability to create any reports from the customer specific database.
What I mean is, we publish the dataset on a portal the customer can then drag and drop the tables they needed, create the joins to create the required report.
Is it possible to do this in PowerBi or SQL Server Reporting service?
Many Thanks
Service Content Pack
It is possible in Power BI by developing an online service content pack. This allows online services to give their customers insight into their own data via the PowerBI.com cloud service. The ISV pre-builds the data model (and some initial charts); the end user doesn't have to worry about joins at all. They can drag & drop the fields that the ISV makes available.
There are some base requirements (it has to be a SaaS application that has an API accessible via the public internet).
More information: https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-content-pack-overview/
Embedding
If the ISV is building their own portal, they can embed SSRS reports on their own website (and use parameters that pass the customer ID from the website directly to each report). This looks like a good place to start: https://learn.microsoft.com/en-us/sql/reporting-services/application-integration/integrating-reporting-services-into-applications. One downside to this solution is that SSRS doesn't allow the end-user to change the reports themselves (no dragging or dropping fields).
You can also embed Power BI reports onto an externally facing website. More information here: https://powerbi.microsoft.com/en-us/power-bi-embedded/
There may be other solutions, such as tools that allow external access directly into SSAS, but I've limited the scope of my response to the two tools you've asked about (SSRS and Power BI).

MVC Web API Report

Im trying to solve an issue in MVC4.
Background:
We have an existing asp.net web application where we have reports section. These are rdlc files with datasource and dataset configured to use an SP to populate the rows which is tied to an aspx view. All these are regular stuff. We have migrated the existing application to MVC rest based web app and apis. Here, the web app send/receive data in json format and used in view accordingly.
Problem to solve:
the data required for the report to show is coming from one of the rest apis which returns json object. The report (.rdlc) traditionally connects to a DB, but in my case, the data is in json. How will I go about mapping the json data to the report view?
Searched lot of forums for couple of days, no real success. Inputs greatly appreciated.
We have the same situation for our ASP.Net MVC application where the RESTful web services pass back JSON data to the front end applications. The MVC application doesn't just provide data, it applies business rules to the data before passing it back and these business rules can't be applied at the database level. So reporting is not straightforward.
We wanted to call these same web services to get the same data as the front end applications get. Fortunately SSRS is amazingly extensible. I created a custom data processing extension that calls our ASP.Net MVC controllers and returns the data, which is deserialised into datasets for use in the reports.
While not trivial, it isn't as hard as you might think and implementing a custom data processing extension is a good way to solve your problem. There are plenty of examples online to get you started. I based mine on the file share example provided with SSRS that queries a network folder and returns the file information as a dataset.

Real time alert in JasperReport Server 4.5?

I am trying to implement a system which sends out email alerts based on certain changes in the database - for instance, if the revenue for a certain store drops below 50% of the 30-day average, we'd like to automatically generate an alert to the relevant decision makers, so they can check what's going on. (Fictional example, we don't have stores)
Does JasperReportc Server 4.5 (or any other related tool) provide any functionality which could accomplish this? If not, is there any open-source solution which would be suitable? Ideally we'd like a user-friendly frontend to define the criteria and design the alert mails.
Or can it be possible at database level?
Thanks.
I have to mention that Jasper is just a reporting tool. It does not send any email alerts or anything. All it can do is generate dynamic reports at different times.
Perhaps your application itself can use SMTP or IMAP to send emails. You can code the necessary conditions in your application itself.
You can use Jasper in your application when you want fast-building dynamic reporting solutions. It takes less time on Jasper to create a report than building it in the application. Also, Jasper can have your report exported in PDF or Excel format also without having to jack around with API files. Jasper also offers charts and other graphical reporting structures.

After a report / document template tool to generate documents from SQL Server

I'm after a tool to generate decent-looking documents from templates, that needs to:
be invoked through code (not interactively)
run on Windows, ideally invoked from code within a web-server
process standalone* report files that contain their own internal data definitions, query options, etc (i.e. ideally so that we can push simple report files to the server, and it simply work - where report/document maintenance is not necessarily a developer activity)
access data from a database (SQL Server 2005) based on parameters (ids etc) that we pass in
export (again, through code) to pdf or similar
*= where standalone simply means that the report is fully self-describing; it is fully expected that additional reporting runtime components will be required to execute the report. Contrast to rdlc which uses the data-sets from the local VS project.
I looked at the rdl/rdlc options (Visual Studio 2008), but rdlc seems to be coupled to the assembly (not standalone), and rdl seems to lack the code-based export ability. The version of Crystal Reports included in VS2008 seems very similar to rdlc - presumably the full Crystal Reports offering has more functionality, but has a non-trivial price tag too...
I'd welcome any suggestions for an appropriate, professional looking tool that might be suitable and recommended...
I think SQL Reporting Services fully support all of your requirements.
I have build some sophisticated solutions myself with SSRS.
(Example)
Fully manageable through code (via SSRS WS) (Upload, execute and export Reports)
Used SQL Server as database
Queries are defined in RDL (or Stored Proc) and based on parameters
There are other solutions like Telerik Reporting or Data Dynamics ActiveReport, but they are not free.
Let me know if you need more informations
SSRS WS: With that I mean the Web Service Interface (Report Server Web Service
). There is also a URL Access method, but I don't think it's a solution for you
I dont think you can satisfy all requirements. Number 3 especially is the killer.
On one reading, I see it as adhoc reporting generating it's on SQL. On another, it is giving users "empowerment" to do roll their own within some limits you define?
You may have looked already... but have you thought about using the ReportBuilder functionality to set up the basics and leave users to do the rest? You'll need a report monkey at some point anyway to set soemthing up.
Edit, after comment:
Reporting Services it is then.
It comprises a web service that renders RDL files uploaded from VS.
Report Builder is a template for users to hack and bash their own within the limits and environment you set.
Architecture of RS 2008
Our Data Dynamics Reports product sound like it is for you. It is a fully programmable reporting component for .NET / Visual Studio. View the documentation on the API here. You can export the reports to any of our various formats, including PDF, HTML, and Excel and it also includes an end user designer control that you can embed into your own applications to let end users modify or create their own reports.
The reports are stored in RDL - the same XML dialect that Reporting Services uses - in fact you can take any existing RDL files and open them in Data Dynamics Reports. In addition to compatibility with RDL, we add many more features, such as "themes" to consistently style your report, master reports (think ASP.NET master pages for reports), and several other built in controls such as a calendar, barcode, and dashboard controls to name a few.
Now lets look at your requirements one-by-one and see how Data Dynamics Reports might solve them:
be invoked through code (not interactively) - Data Dynamics Reports includes comprehensive API.
run on Windows, ideally invoked from code within a web-server - You can use Data Dynamics Reports in client-based, or ASP.NET applications, it even support medium trust ASP.NET applications (webservices are fine).
process standalone* report files that contain their own internal data definitions, query options, etc (i.e. ideally so that we can push simple report files to the server, and it simply work - where report/document maintenance is not necessarily a developer activity) - Data Dynamics Reports uses standard RDL (not rdlc) which includes all information bout how to retrieve data from your datasource. We also include an end user designer control to allow you to emebed a design environment for these standalone files into your own applications.
access data from a database (SQL Server 2005) based on parameters (ids etc) that we pass in - Data Dynamics Reports includes comprehensive support for parameters (even get the "valid values" from a query.
export (again, through code) to pdf or similar - Data Dynamics Reports supports exporting to PDF, HTML, Excel, Word, images, and XML.
I hope it works out for you, and let me know if you have any additional questions.
Scott Willeke
Data Dynamics / GrapeCity inc.
I think, based on all the criteria, you likely need to look at Crystal Reports, since you want the reports to be standalone, although, you could also create a report designer out of XtraReports or ActiveReports Pro and have much of the same functionality.
As for running it on the fly and having it generate, distribute, and archive the reports that run, check out our product at www.versareports.com. It should work with any .NET report designer you want to use and provides the enterprise-class report server framework you likely need.