Solved

Printing labels from vb.net

Posted on 2007-04-10
5
2,657 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

696 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