关于从表格打印的C#问题 [英] C# question on printing from forms

查看:85
本文介绍了关于从表格打印的C#问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计们,



我有一个问题,我真的希望得到帮助。



我需要创建一个窗口表单应用程序,需要在现成的文档上打印,

有什么技巧可以让我得到每个输入的文本并将其放在这个表单中它们可以打印表格?





另一个问题是表格将会打印出来,所以我需要制作一张空白文件,其中包含我想是现成的文件。



我尝试过:



我没有开始,因为我正在研究如何做这个文件的事情。如果有人可以帮助我,我真的很感激。谢谢。

hi guys,

I have a question and i really wish to find help with.

I need to create a window form application that need to print on a ready made document,
There are any techniques of how can i get the text of each input and put it in this form and they can print the form ?


The other problem is that the form is going to be already printed so i need to make a blank document with the positions of the ready made document i think.

What I have tried:

I have not started well since i am researching on how i can do this document thing. If someone can help me i really appreciate it. Thanks.

推荐答案

有很多方法,如果你有 Word 那么你可以使用Word自动化,请看这里的文章:使用C#进行Word自动化:以编程方式创建Word表格 [ ^ ]

您也可以使用报表查看器控件,但遗憾的是,在较新的Visual Studio版本中不再安装此标准,仍然可以通过下载此控件然而,NuGet

ReportViewer 2016控件入门| Microsoft Docs [ ^ ]



当然,也可以在代码中以编程方式执行所有操作,请参阅: PrintDocument Class(System.Drawing.Printing) [ ^ ]
There are lots of ways, if you have Word then you can use Word automation, see article here: Word Automation using C#: Create a Word Table Programatically[^]
You can also use the Report Viewer control, but sadly this is not installed standard anymore in newer Visual Studio version, it's still possible to download this control via NuGet however.
Getting started with the ReportViewer 2016 control | Microsoft Docs[^]

Of course it's also possible to do everything programmatically in code, see: PrintDocument Class (System.Drawing.Printing)[^]


这篇关于关于从表格打印的C#问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆