Solved

Print address labels from .Net including customs forms

Posted on 2010-09-11
12
517 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
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!

 
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

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