Solved

Print address labels from .Net including customs forms

Posted on 2010-09-11
12
513 Views
Last Modified: 2012-05-10
Using c# in MS Visual Studio 2010 we created an application which generates a list of orders we need to print.  I need to get this list printed on to Avery labels sized 4 per sheet.  If the order is to a foreign country we need to fill in a customs form.  

I have attached an example of what needs to be printed.  The fourth address is foreign to us and so I have attached the customs form.  In this case it is filled out by hand but I would like to have the details printed including the date signature at the bottom.

I am have MS Office 2010 installed as well as Crystal Reports in case they help.  If there is an affordable tool (<£100) I would be happy to purchase if it would make the task easier.  Thanks! Sample Label
0
Comment
Question by:canuckconsulting
  • 7
  • 5
12 Comments
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 33652695
RDLC reports would be a good choice as it comes bundled with VS with no extra cost and by what you have posted here , it would be a piece of cake to implement your requirement
0
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 500 total points
ID: 33652699
0
 

Author Comment

by:canuckconsulting
ID: 33652950
I've started playing with this but can't get beyond it wanting to connect to a a database. I have retrieved the data from online services so don't have a data source to point it to.  Is there a way to connect this report to my list?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 33652992
your data source can be anything, not necessarily a db. the best way to go about is to point your data source to a list of objects which you can then load via a web service call, sql  or any other way you want
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 33653003
0
 

Author Comment

by:canuckconsulting
ID: 33653043
I created a new project and was able to follow the example perfeclty.  

In my existing project however when I choose to use an Object as a data source I am unable to drill down to the class I want to use as the data source.  Only my ado.net classes are shown (tableadapters, etc).  Any thoughts on a setting or problem I may have introduced in my existing project which would restrict access to using non-ado.net classes as data sources?
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 33653202
you can start with the the accessors to them, most probable they will be private. The data sources will only show up if they are public.
0
 

Author Comment

by:canuckconsulting
ID: 33660554
Accessors aren't the problem...everything is explicitely public.  In fact if I copy the same file/class to my other new project it works great.  Not a big deal but if you can think of anything else I would be grateful.

Final question; how do I get each record to go to each quarter of the page?  I can get things working in a standard tabular way but am having trouble getting the first record in the top right corner, the next in the top left, etc.

Thanks for your help...this is working great!
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 33660637
you can use a table format and then set the alignment of the cells according to your requirement.

are your objects nested ?? only the first level shows up it seems, take a look at this http://www.gotreportviewer.com/objectdatasources/index.html
0
 

Author Comment

by:canuckconsulting
ID: 33660983
No, not nested.  It is very strange and again only seems to occur in this other project.  I do have a database datasource already setup.  Perhaps I can't have two types of data souces in the same project.

I have been trying to accept your help as the solution but the button isn't being displayed!  Trying to figure this out now...
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 33661055
no worries...I don't think having two data sources would be creating any problems.. just out of curiosity are these classes in a different project (you said u copied it to a new project and it worked. May be you didn't add reference of that project into the report project)?
0
 

Author Closing Comment

by:canuckconsulting
ID: 33784383
Perfect!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 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