简体   繁体   English

使用AngularJS在MVC4 WebAPI中进行报告

[英]Reporting in MVC4 WebAPI With AngularJS

I have been creating a web application with MVC4 webAPI as backend and AngularJS for frontend. 我一直在创建一个Web应用程序,使用MVC4 webAPI作为后端,并使用AngularJS作为前端。 Now I have been in situation where I have to present reports , invoices and other such documents from the application. 现在,我不得不提交申请表中的reportsinvoices和其他此类文件。 But I don't have any proper tool that could help me to print and download as PDF at the same time. 但是我没有任何合适的工具可以帮助我同时打印和下载为PDF。

I had reviewed several products to make that working but haven't got any tool that would fit my purpose to print and PDF conversion to get downloaded. 我已经审查了几种产品以使其正常运行,但没有任何适合我打印和下载PDF转换目的的工具。

  • SSRS Report : I did checked the SSRS report with report viewer but as this is a web application, my hosting provider does not provide support for the reportviewer library installed or SSRS controls on the server. SSRS Report :我确实使用报告查看器检查了SSRS报告,但由于这是一个Web应用程序,因此托管服务提供商不为服务器上安装的reportviewer库或SSRS控件提供支持。

  • JSPDF: I did tried JSPDF to print and convert the reports to PDF but the alignment for the tables, colspans and other stuff becomes very messy and complex to work with JSPDF . JSPDF:我确实尝试过JSPDF来将报告打印并转换为PDF,但是表格,colspans和其他东西的对齐变得非常混乱和复杂,无法与JSPDF一起JSPDF

Can anyone suggest me which would be the best way to create reports which could get download and print with easy setup. 谁能建议我这是创建报告的最佳方法,可以通过简单的设置下载并打印报告。

You can check jsreport . 您可以检查jsreport It is designed for creating static documents like Pdf reports using javascript templating engines on the server. 它旨在使用服务器上的javascript模板引擎创建静态文档(如Pdf报告)。 It's free and open sourced on github. 它是免费的,并在github上开源。

You can run it along .net process using jsreport.Embedded nuget package, benefit from visual studio extension or even create pdf files directly from your asp.net mvc views using jsreport.MVC nuget package. 您可以使用jsreport.Embedded nuget包在.net流程中运行它,受益于Visual Studio扩展 ,甚至可以使用jsreport.MVC nuget包直接从asp.net mvc视图创建pdf文件。

If your shared hosting provider will block jsreport.Embedded , you can still connect jsreport online service which will handle report rendering for you. 如果您的共享托管服务提供商将阻止jsreport.Embedded ,您仍然可以连接jsreport在线服务 ,该服务将为您处理报告呈现。

PS: I'm jsreport author. PS:我是jsreport的作者。

If you haven't already, i think you should try DBxtra , you can upload the Report Web Service component (the web component) to your server without installing anything there, then connect to it from your own computer and design reports from there; 如果您还没有,我想您应该尝试DBxtra ,您可以将Report Web Service组件(Web组件)上载到服务器而无需在服务器上安装任何东西,然后从您自己的计算机连接到该服务器并从那里设计报告。 it will let you design, print and export to PDF (and other formats) pixel perfect reports just as you wish and you can embed the reports into your own application using Web Report Widgets . 它使您可以根据需要设计,打印并导出为PDF(和其他格式)像素完美的报告,并且可以使用Web Report Widgets将报告嵌入到自己的应用程序中。

PS: I'm a DBxtra evangelist. PS:我是DBxtra的传播者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM