?
Solved

Help with exporting data from a DataGridView

Posted on 2014-03-10
10
Medium Priority
?
233 Views
Last Modified: 2014-03-13
Hi,

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

Thanks,

Victor
0
Comment
Question by:vcharles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39919673
Hi Victor;

Do you have a PDF library which will produce documents in PDF format?
0
 

Author Comment

by:vcharles
ID: 39920037
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
 
LVL 1

Expert Comment

by:jasnakozelj
ID: 39920056
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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:vcharles
ID: 39920116
Hi,

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

Thanks,

Victor
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39920488
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
 

Author Comment

by:vcharles
ID: 39922094
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
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 2000 total points
ID: 39922194
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
 

Author Comment

by:vcharles
ID: 39922214
Hi,

Will do.

Thank You.

Victor
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 39922518
Not a problem Victor, as always glad to help.
0
 

Author Closing Comment

by:vcharles
ID: 39926625
Thank You.
0

Featured Post

How To Install Bash on Windows 10

Windows’ budding partnership with Canonical has certainly led to some great improvements. One of them being the ability to use Bash on your Windows machine without third party applications! This might be one of the greatest things a cloud engineer in a Windows environment can do!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question