Can I display report services file (RDL), direclty in a view with MVC (Razor)? Tried in various ways, but without success. Anyone have any useful tips about this?
Sorry for bad english.
Regards,
No, you cannot as the RDL file requires a viewer control which is a server side control to render the report. MVC Razor views do not support server side controls.
But.. you can add an .aspx page to your project and add a report viewer to that page. It won't work with the Razor .vbhtml or .cshtml files in MVC
Related
We are using DevExpress DX.10.2. Our client has asked to be able to view the XtraReport templates (not the report itself, just the template) within an MVC 3 application that we maintain for them.
My first thought was that I'd have to fake the data to look like the "template" and show the actual reports. However, I noticed in Visual Studio that the XtraReport designer has an "HTML View" option that renders the template in HTML.
I would think that if DevExpress is able to render the template as HTML in the designer then it's likely that there's a way to extract that HTML to render on a view. Is there a way to extract HTML from an XtraReport template?
Thanks!
Stumbled across the solution. Had to add a reference to DevExpress.XtraReports.Web and then the following line writes the report HTML to the response stream:
XtraReport1 report = new XtraReport1();
DevExpress.XtraReports.Web.ReportViewer.WriteHtmlTo(System.Web.HttpContext.Current.Response, report);
Is there a Design View in ASP.NET MVC3 ?
There is no 'Design' view in MVC, like there is in Forms. However your views are just HTML so you can use any HTML editor, although they will not be able to interpret the Razor syntax.
What most people do is make changes to the HTML, save (you don't have to recompile,) and refresh your browser. Google Chrome has a very help full tool built in (Firebug or something like it.) Just right click on the page and select Inspect Element. This will come in very handy.
Also one thing to think about since you're new to MVC is that you can easily use most any css themes that you can find online to make the site look very different out of the box.
i have an existing MVC3 Application.
This application uses the Razor view engine AND the aspx Viewengine (for rendering telerik reports).
I want to integrate this MVC Application to Orchard (never used Orchard before).
My question is:
is this possible?
can orchard render views with a aspx viewengine?
thanks for your answers!
Orchard can render aspx, yes, but to make this application work inside of Orchard you'll have to transform it into an Orchard module. if those aspx reports are not MVC but use Webforms postbacks you probably won't be able to use them unless you isolate them into a separate application.
The question to ask would be why do you want to integrate this MVC app to Orchard?
I need some help!
I try to design my master page by _Layout.html with Razor. But I can see it as review cause there's no View mode in Visual Studio. I just want to know: Does _Layout.cshtml in MVC3 has view mode, source mode and split mode like masterpage (*.Master) ? If yes, how can I use it?
Thanks all!
No, there is currently no WYSIWYG editor in Visual Studio for ASP.NET MVC view designing.
But there is a brighter side to that answer. Use FireFox and a plug-in called Firebug. Firebug is possibly one of the greatest tools that a web developer can have. It not only lets you see everything from markup to Ajax requests, but it also allows you to do real-time editing/modifying of HTML and CSS.
Firebug
I have a question. Is it possible to work with AJAX Control Toolkit in razor views?
I need to use TabContainer or similar (it could be a HTML Helper)
I know I can use it in aspx but I'm using Layouts on my project... so maybe a partial view is the solution, I really don't know.
Regards.
I have a question. Is it possible to work with AJAX Control Toolkit in razor views?
Not recommended. The AJAX Control Toolkit consists of server side controls which depend on ViewState and PostBack which are notions that no longer exist in ASP.NET MVC. So referencing the AjaxControlToolkit assembly inside an ASP.NET MVC application is like attaching a caravan on a Lamborghini.
As an alternative you might take a look at jQuery UI which has many useful widgets such as Tabs.