发送给最终用户的报告的文档布局

发布于 2024-10-13 18:56:40 字数 695 浏览 3 评论 0原文

我对 C# 和 .NET 还很陌生 - 我正在重新设计过时的基于 Excel/VBA 的引用和引用。库存系统。大部分 UI 和后端已经构建完成。

问题是我正在努力弄清楚如何最好地创建和打印将发送给客户的文档 - 即报价本身。

所以,我的问题是:您会推荐什么作为新手容易掌握的东西来创建看起来像我在此处包含的文档的文档?我们的预算几乎为零(只是为了让事情变得更困难!)我尝试了一些网上流传的免费控件,但它们似乎都不是特别容易使用(没有所见即所得的编辑器)或者它们崩溃了(甚至嵌入了 Excel 请注意,这些文档有时可能会溢出到 2 页或更多,

具体取决于所涉及的雇用情况,并且我们希望“整齐”的分页符(即底部有页脚,而不是看起来像它刚刚被砍掉了)。

这些文档将输出为 PDF、打印机,或者在极少数情况下输出为 HTML(尽管如果无法实现 HTML,这也不是世界末日)

顺便说一句,由于上述缺乏预算,我使用的是 C# Express 2010 ,所以任何与完整 VS 捆绑在一起的东西可能都无法工作,除非它得到 Express 支持。

编辑:无法以新手身份发布图像...基本上它是一个带有水印的文档,地址位于左上角,顶部中间有一些详细信息,徽标右上角,然后在其下方是全角项目表以及相关价格。然后在底部有一些销售长篇大论、签名和页脚。所以它有点像一个带有页脚的 3 x 网格,其中嵌套了一个用于显示价格等的网格。格式很好(彩色文本采用漂亮的字体,圆角的标题,很好的间距等等......)

I'm pretty new to C# and .NET - I'm in the process of redesigning an outdated Excel/VBA-based quoting & inventory system. Most of the UI and backend is built already.

The problem is that I'm struggling to figure out how best to create and print the documents that will be sent to clients - namely the quotations themselves.

So, my question is thus: what would you recommend as something easy for a newbie to get to grips with to create documents that look something like the one I've included here? Our budget is practically zero (just to make things harder!) I've tried a few free controls floating around on the net but none of them seem to be particularly easy to use (no wysiwyg editor) or they crash (even embedding an excel sheet into the form seems to crash the IDE)

Note that these documents can sometimes spill over to 2 pages or more depending on the hire in question, and we want 'neat' page breaks (i.e. with a footer at the bottom, not looking like it's just been chopped off).

The documents will be output to either a PDF, a printer, or in rare cases HTML (although it's not the end of the world if HTML isn't possible)

Incidentally due to the aforementioned lack of budget, I'm on C# Express 2010, so anything that comes bundled with full VS is probably not going to work unless it's supported by Express.

EDIT: Can't post images as a newbie...basically it's a document with a watermark, address at top left corner, some details in the middle at the top, logo top right, then under that a full-width table of items and associated prices. Then at the bottom a bit of sales spiel, a signature, and a footer. So it's kinda like a 3 x grid with a footer, with a grid nested inside that for the prices etc. Formatted nicely (coloured text in a nice font, rounded corners for headings, nicely spaced out etc etc...)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

幸福丶如此 2024-10-20 18:56:40

您没有说您正在构建基于桌面还是基于网络的应用程序,但我假设它是一个网络应用程序。

您可能需要考虑的一种选择是将模板的各个部分保存为 .rtf 文件,然后根据不同的部分组装最终文档。 rtf 是一种基于文本的格式,因此您可以对其进行字符串替换等。

You don't say if you're building a desktop or web based app, but I'll assume that it's a web app.

One option you might want to consider is saving the parts of your template as an .rtf file, and then assembling the final document based on the different parts. rtf is a text-based format, so you can do string substitutions, etc on it.

壹場煙雨 2024-10-20 18:56:40

我每年都会做几次这样的工作,并且我将 Crystal Reports 与 C# 主机一起使用。我有一个关于控制参数和创建多个文件的问题,这可能会有所帮助:

Crystal Reports“文件中断”

创建实际的水晶报表非常简单,尽管我们通常不会做任何特别花哨的事情。它不是免费的,但它是一个很好的工具,它可以完成这项工作。

I do this kind of work a couple of times per year, and I use Crystal Reports with a C# host. I had a question about controlling parameters and creating multiple files that might be helpful:

Crystal Reports "File Break"

Creating the actual Crystal Report was pretty simple, though we don't generally do anything particularly fancy. It ain't free, but it's a good tool and it will get this job done.

病毒体 2024-10-20 18:56:40

我发现使用 SSRS(SQL Server Reporting Services)报告取得了成功,特别是当数据存储在数据库中时。您仍然可以使用报告并从 Winforms/WPF 中的 VS 报告查看器显示/打印它们。虽然我不确定 VS Express 中的设计器支持。

I have found success using SSRS(SQL Server Reporting Services) reports, especially if the data is being stored in a database. You can still use the reports and display/print them from the VS Report viewer in Winforms/WPF. Although I am not sure about designer support in VS Express.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文