Viewing Reports without ReportViewer Control - asp.net-mvc

Having a JS web application (ASP.NET MVC, talking via REST with the server) I cannot use the server-side ReportViewer Control to open reports generated by the Microsoft Reporting Services.
I am searching for ways to open reports without making the Reporting Services public. It is no option to pregenerate the reports and just linking them.
My first idea was setting a route to a server-side controller that creates a web request (calling Reporting Services with all necessary parameters), caches the response and returns it to the client. But I am not sure if this will be the best solutions.
Does anybody had the same task and might share his/her solution?
Thank you!
Oskar

In fact, reports may have subreports, which have to load data from the server it's the best choice to use the ReportViewer Control. So the solution is to create an plain old Web Forms APSX having this control included until there will be an updated/new control from Microsoft. This works pretty good.

With no postbacks ReportExecution2005.Render will be your friend. Drop the report viewer and create a scheme that works for you:) Telerik controls just released a MVC viewer control but.
Already, I implemented a BaseReportController in conjunction with a BaseReportModel in conjunction with a BaseReportView that includes paging, exporting, refreshing etc. etc.
Pain in the ass...please let me know when there is something better.

Related

Converting a regular MVC site for use in phonegap

I have a site that's done using ASP.NET MVC and jQuery. Is it possible to modify my existing project without too much of rework so that it can be used in phonegap to create iphone/android apps?
Here's an approach: move your logic to an MVC WebAPI (or other REST/webservice) project, then convert the MVC site into a simple html/javascript/css/image site (Mobile site). Then refactor your Mobile site to use Ajax/JS to query the WebAPI/Rest services you created. Once you've separated your code this way, you can then package the Mobile site with Phonegap. I'm not sure how much work that will be for you or your project. If you're using a lot of Html Helpers or Razor markup in your views it may be too involved.
The core point of my suggestion here is to separate your mobile UI layer and the backend processing layer so you can only package the Html5/UI/Javascript layer with Phonegap and leave the backend processing on your web server. I don't think I need to explain this, but obviously the app packaged with Phonegap is not going to have the MVC/.Net framework available on the mobile device to render views or execute controllers, etc. By migrating your UI to be simple Html5 and Javascript you can use Ajax/Jquery/Javascript calls against your backend, which you will probably want to host in ASP.Net MVC WebAPI.
Edit: Guess there was some confusion about my suggestion. I'm not saying this is the only way to do go, but this is what I'm familiar with as it's how our team builds our desktop/web + mobile + phonegap + mvc4 + webapi + kendoui application. This pattern works well for us so maybe it'll work for you too, or at least give you some ideas on how to structure your solution. Good luck!
I'm not sure but you need a server to compile the ASP.NET right? so I don't think that will work for you. I think you need to work with AJAX to do your ASP.NET work and separate your ASP.NET code and your HTML-jQuery because Phonegap wants a index.html file. You can store your ASP.NET files at a server tough
The answer to your question really depends on the type of site you are trying to convert. Are you just trying to put a native framework around HTML and get your app into an app store?
If it is is mostly or entirely informational in nature and you have simply used MVC to build brochure-ware type pages then it should be fairly easy to move. This assumes that there is little to no logic other than page to page navigation.
If your site instead pushes a lot of data around that relies on a back-end server you will need to re-architect it to store data locally or pre-fetch it via a manifest. Next you will need to implement a strategy that allows you to push your local data back to the server.
Does you app need to run in a disconnected state?
Phonegap is one of the options if you want to target multiple mobile platforms & may be most widely used. Since you are using jQuery, jQueryMobile will be a least learning-curve path to use. Effort is mostly on the front-end UI and will depend on how many screens you want to design to provide a sub-set or the full set of functionality you already have on the web UI. Most likely you will have to redesign your screens using the jquery-mobile UI widgets documented here. It is also a good way to show it to your customer the initial screen design with navigation.
jquery mobile is great for learning and designing , but it's slow in the web browser control that phone gap runs in .
you'll need a more lightweight framework for this .
you can use an inappbrowser control to show your site in case it's responsive , but you wont have the device camera and contacts and so ...
take a look at : http://docs.phonegap.com/en/3.0.0/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser

asp.net mvc property changed event

I'm a .Net desktop applications developer trying to switch to ASP.Net MVC (3 or 4 doesn't matter). We have a .Net library which notifies any GUI you want to put on this assembly by Property Changed Events (or any other custom event we deemed necessary for that matter).
This might not even be a relevant question, because perhaps it's done totally different in ASP.Net MVC, but how do you update your View in the browser on your client after receiving a Property Changed Event from an assembly on your server? We generate these events ourselves by the way. The assemblies are our own.
I've read about Partial Views, but I need to look into that. Whatever I came across seemed so cumbersome. Because it's really straight forward and simple in desktop development. So I'm starting to wonder if Property Changed Events are the way to go when developing for the web.
Thoughts? Links? Sources? I'm interested.
p.s.: See tags for a further understanding of what I'm going for.
HTTP world is entirely different
you request something from the server(Asp.Net MVC) and you get a response back from the server.
there is no way in which the server can contact the user back** as the asp.net server wouldnt keep anything in memory after the response
so here you are wrong in 2 aspects
1. property changes - because after the response there is nothing in the memory of the server there are no models(Objects) so there is nothing whoz property is actually changing
2. even if u maintaining something static if that changes there is no way for you to contact the client back
**there are some frameworks available that allow you to contact the client back and they do this by sockets or comet
You need to move away from the Event-driven thinking of desktop (and WebForms for that matter)-development.
MVC is a designpattern for separation of concerns, and no tightly bound events will exist, unless you do some hack-ish work of your own.
You can, however, accomplish this by using frameworks like SignalR that rely on Javascript and open connections, but the notion of events is not present in MVC.

how do you integrate a save/publish invoked from excel to asp.net mvc?

I've been probing around and have not found any hits nor do I have a lot of experience with this topic. I would like to open an excel document (ideally from an asp.net mvc model) and then post this model back to an asp.net mvc controller action for a save/publish through the application.
I would prefer to stay away from excel storing directly to the database, opting instead to go through the mvc action in order to adjust cache, run business rules, etc.
Any tips on places to look or how this is done? I know TFS 2010 does this fine as does sharepoint but I'm not aware of the underlying technologies.
Thank you in advance!!
Jim
After more research it is apparent the answer to this lies in the VSTO libraries. Initially I had a hurdle in place with our virus scanner which would not allow me to build a custom ribbon giving 'access denied' when attempting to load in my .dll's.
Beyond this, the API is fairly straightforward for adding a custom ribbon which has access to WCF, among any other .NET APIs within Excel (or any office tool). This WCF service can invoke the MVC Controllers, if required, or directly perform business logic themselves - the sky's the limit.

Adding Reporting Capabilities to MVC?

Background: I currently have a Web Forms, ASP.NET 3.5/C# application which I'm interested in converting to MVC 2. It's a relatively tiny app so the exercise shouldn't take too long. The two primary functions the appliction does is allow users to
1) view and enter their data - metrics
2) view output reports of this data aggreggated at a higher level.
This second point is of concern to me as my first impression of MVC is that most of the reporting tools do not work with it. I'm currently using ReportViewer for 2) but I read here and on other sites that configuring it to work with MVC is a pain.
Are there any other types of Reporting capabilities that I could use with MVC 2? Are there some that work "out of the box"?
Or in your experience of using MVC 2, would it be easier to put together your own report? My requirement is to make a report that is similar to ReportViewer's Matrix style, with a few merged cells and a drill down by two levels. Don't know if that's way too complicated to do with MVC from scratch or not.
EDIT: Bonus if you know of any other Reporting add-ons that work with MVC besdies ReportViewer.
I have used the RDLC local reports to do this but I don't use the report viewer (even in webforms). I always stream the report straight to PDF. This works great in MVC as well since in this case I am avoiding the report viewer control.
This tutorial/post shows how to stream in MVC.
Please check my tutorial about reportviewer and mvc2 -> How to use ReportViewer 2010 in MVC.NET 2
Hope it helps you

Best way of building an application having a UI like OUTLOOK?

We are trying to build an application which has a UI like OUTLOOK?
Something which has a left navigation pane and then right side there is a details pane.
It would be a heavy on data side. We need to access Database numerous times to access the data to be displayed.
Is SILVERLIGHT a good option which will provide RIA effect? Or Should I stick to ASP.NET building aspx pages and giving it a rich effect with Ajax?
What are different ways of handling this situation?
I've always thought ExtJS has a very Office 2007 Look and feel
http://www.extjs.com/deploy/dev/examples/feed-viewer/view.html
I will suggest you look at WPF, it will be perfect for this type of application. It does have the advantages of both ASP.NET since you can create browser pages and also the UI capability of Silverlight, some people say WPF is like Silverlight with steroids.
The RadControls from telerik have a built in Office and Outlook skin and provide all the different controls you want (grid, left panel bar, right grid, right scheduler) Their controls are available for Silverlight, ASP.Net and WPF so you can try them both out and see what works for ya.
Outlook grid example
Outlook Panel Bar Navigation example
Silverlight Scheduler
I'm using them and they're great.
I think you need to decide whether your users are OK with installing your application (WinForms, WPF etc) or if it has be run from a web browser (Silverlight, ExtJS, Ajax). Constructing an Outlook clone in a web environment is often more difficult (browser compatibility), and you can have issues with performance. However web applications are easier to update and maintain.
Consider usability too. For a desktop application Outlook may be a reasonable model to follow, but users often expect the web to work differently from desktop applications.
If you're going to use Silverlight or WPF then check out these blog posts on using the Prism framework to build a modular UI which looks like Outlook.
http://blogs.msdn.com/erwinvandervalk/archive/2009/03/02/how-to-build-an-outlook-style-application.aspx
http://blogs.msdn.com/erwinvandervalk/archive/2009/04/29/how-to-build-an-outlook-style-application-with-prism-v2-part-2.aspx
Prism (http://www.codeplex.com/prism) was designed to build just this sort of modular UI.
Ade

Resources