Solved

Printing labels from vb.net

Posted on 2007-04-10
5
2,655 Views
Last Modified: 2008-02-01
I would like to print labels from a .net form. I have looked at the possibility of printing directly from vb.net or sending data to Word and printing from there. I see there may be a few ways of putting the data into Word and have experimented with using a Word.XML template type file with some success. I'm looking at replacing text in ordinary Word file now. I haven't worked out how to do this without opening and closing the file for every print yet.

Each label I print will vary slightly in one field (this data is from scales via serial connection). I'd like any advice re neat and foolproof systems for printing this data. The solution is no good if code fails because two word applications are open or anything vague like that. I will print a summary with a total weight from my dataset after printing a batch of labels. It seems neat to save an xml file at this point and fill in a Word.XML template from the saved data. The individual labels have still got me scratching my head and slowly exploring vb.net.

Points: I can do 500 and spread em around if people will be so kind as give some ideas that might save me a bit of time. I don't expect there are right and wrong answers to this, rather there may be insightful assistance If I'm lucky.
0
Comment
Question by:PiedBird
[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 Comments
 
LVL 3

Accepted Solution

by:
dmagliola earned 167 total points
ID: 18887604
In my experience, the best tool to do this is Crystal Reports.

Word will do the job, but it'll give you lots of headaches (many of the type you mentioned, with open instances of Word doing strange things), and it can get pretty slow too.

Also, printing straight from .Net will work, but styling the output will take you too much time for it to be practical, and if you ever need to change it it will probably be painful.

I have in fact created an application similar to the one you intend, from what I understand. It's also an application that takes input from a scale, and prints out a label to stick on the thing being weighed. Crystal reports behaves wonderfully.
0
 
LVL 18

Assisted Solution

by:vbturbo
vbturbo earned 167 total points
ID: 18887919
Hi

These would might be of some assistance and give a couple of inputs.

http://www.codeproject.com/vb/net/dynamic_report_with_query.asp

http://www.codeproject.com/vb/net/CrystalContrl.asp

vbturbo
0
 

Author Comment

by:PiedBird
ID: 18887938
Thanks both.
I'll have a little look and get back to you.
0
 
LVL 28

Assisted Solution

by:iboutchkine
iboutchkine earned 166 total points
ID: 18889127
I prefer to use MS Access. ENter you records to the database and create report that will print labels. Then call this report from .NET application
0
 

Author Comment

by:PiedBird
ID: 18893248
Thanks. I don't have Crystal Reports so for the minute I'll work with vbturbo's first link and the Access idea. I've worked with Access reports before but only from Access. I might post another question about how a joint effort of .Net and Access might be structured; a few ideas before I start could be a whole lot quicker than my usual clueless approach.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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