Solved

Help with exporting data from a DataGridView

Posted on 2014-03-10
10
231 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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