When you use the FastReport .Net together ASP.Net MVC framework you have easy method for creating file in any supported format on button press in HTML form.
Add next code in View:
@using (Html.BeginForm("GetFile", "Home")) { <input id="pdf" type="submit" value="Export to PDF" /> }
GetFile - name of controller handler, Home - name of controller (HomeController.cs for example)
Add name space in controller: more...
The object WebReport from FastReport .Net use jQuery library. You already can use this library in your own project.
To avoid duplication of boot scripts and styles jQuery to the client browser when working with markup Razor, you need to use the following lines in_Layout.cshtml:
@WebReportGlobals.ScriptsWOjQuery() @WebReportGlobals.StylesWOjQuery()
instead of the others, which include all jQuery files: @WebReportGlobals.Scripts() @WebReportGlobals.Styles()
You need to set the property ExternalJquery = true (default false) when you working with ASPX markup. more...
We often use zebra striping of table data for easy viewing the reports. Highlighting even rows is good for viewing but they look strange on paper or in Excel table. FastReport users have two methods for using highlighting only in preview window.
Method #1
You need to open report in the Designer and open the Style Editor from Report-Styles menu. Then we add a style with name "EvenRows" and set needed background color for even lines. Then you need to set a band property EvenStyle = EvenRows. more...
1. Improved integration with FastReport: reports now use grid highlights and style. Fixed cell autosize options: adjust width, adjust width with restrictions and adjust height.
2. Added FireDac support.
3. Extended scripting abilities:
a. «Calc all cells» option –to build calculated measure for empty cells (which does not have records in source dataset),
b. calculate totals with script,
c. “FormulaDetail” aggregate - calculate measure values on source data (not on other measures).
4. Copy to clipboard now copies headers.
We have released FastReport .Net 2013.2 with MVC support. And I'd like to inform all WebReport developers about some changes.
First. An extension of the handler in web.config was changed. You need replace old string «FastReport.Export.aspx» to new string «FastReport.Export.axd» everywere. Web application without these changes will throw an exception and you will see text with error and instructions for changes in web.report. more...