Help with exporting data from a DataGridView

Hi,

How do I export data from two DataGrids in one PDF file exactly as shown in the Grids?

Thanks,

Victor
vcharlesAsked:
Who is Participating?
 
Fernando SotoConnect With a Mentor RetiredCommented:
Hi Victor;

At the following link you will find a article on how to create, browse and modify a Word document, step by step. This subject matter is extensive and can not be answered in a couple of post so please go through the steps.

How to automate Word from Visual Basic .NET to create a new document
0
 
Fernando SotoRetiredCommented:
Hi Victor;

Do you have a PDF library which will produce documents in PDF format?
0
 
vcharlesAuthor Commented:
Hi,

I don't, was hoping .NET library already had the required files to achieve this, I can export in excel, but was hoping to also export in PDG or Word.

Thanks,

Victor
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
jasnakozeljCommented:
You won't be able to do it without a .NET library that is capable of document creation/generation. The only free libraries from Microsoft are Open XML SDK (Word only) or Office COM (this one is not recommended to use). There are also some 3rd party libraries which you can accomplish it by creating a template document first and then populate it with your (DataGridView) data from your application.
0
 
vcharlesAuthor Commented:
Hi,

I'm trying to avoid third party controls, how do I export the data in word?

Thanks,

Victor
0
 
Fernando SotoRetiredCommented:
Hi Victor;

iTextSharp is a free PDF library and can be install into your project by using NuGet from within Visual Studio. In the search box just type in iTextSharp.

This may be a better option because if I am not mistaken in order to print from a MS Word document each user of your code is going to need a copy MS Word so that the functions in MS Word can be called.
0
 
vcharlesAuthor Commented:
Hi,

I'm sorry for the late reply, will look into and get back to you. I'm trying not to use third party controls unless I have no choice.

Thanks,

Victor
0
 
vcharlesAuthor Commented:
Hi,

Will do.

Thank You.

Victor
0
 
Fernando SotoRetiredCommented:
Not a problem Victor, as always glad to help.
0
 
vcharlesAuthor Commented:
Thank You.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.