Saving dataset to txt file
Hi,
Im wondering if anyone can tell me how I would save a dataset to a txt file?
Im trying to create a receipt and after many failed attempts of trying to use reportviewer and print it that way I have decided that I will export all my data a txt file and hopefully find an easier way to print it.
Thanks in advance.
Re: Saving dataset to txt file
Have you considered using html to create your receipts?
It'd be quite easy to export + printing html is 1 line of code with a webbrowser control
Re: Saving dataset to txt file
could I use my dataset that way as well? My head is just fried with this whole thing now that Im struggling to even think of different ways.. and exporting it all to a txt file seemed the easiest in my head.
Thanks for your reply =)
Re: Saving dataset to txt file
here's an example of exporting a datatable to an html table + displaying it in a webbrowser control.
when you have the table, you can use the wbc's built in .Print method:
http://www.vbforums.com/showthread.p...html-reporting
Re: Saving dataset to txt file
Thanks very much for your help. :bigyello:
Re: Saving dataset to txt file
Turns out that I cant open it because I have a newer version of studio. :(
Re: Saving dataset to txt file
Re: Saving dataset to txt file
1 Attachment(s)
Re: Saving dataset to txt file
here it is in vb2012:
Attachment 107331
Re: Saving dataset to txt file
Re: Saving dataset to txt file
Sorry where am I putting my dataset in that?
Re: Saving dataset to txt file
a dataset is a collection of datatables.
the example uses a datatable created in code + shows how to create an html table from that.
it's not a complete custom built solution for your problem, but it is a possible method for you to use to print your receipts, but it'll require some effort on your part...
Re: Saving dataset to txt file
I know that, I wasnt intending on not putting effort into it...