+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Create simple invoice with some variables.


(Guest) #1

Hi!

I’m going crazy, so this is my last hope. For the sake of humanity, pleeease let there be some kind soul who can teach me the way of the combit. The environment I work in is as follows: Visual Studio 2010 C# Asp.net winforms.

I’m really confused about how to creating this, i’ve read the manuals 10x each and watched all the samples and stuff but I guess i’m quite dumb cause I cant figure it out.

I’m gonna write EXACTLY what it is I would like to create with the combit List & label step by step.

  1. Create a design file on my desktop, guess it should be invoice or label file or something, you’ll point me in the right direction after i’ve written all down. Let’s call this file “Test”.

  2. In this design I would like to have 6 textholders (variables?, user variables?) for name, adress etc.

  3. In my webform project I would like to press a button and automatically add some text to those 6 textholders in my “Test” and then export is as PDF to my desktop.

  4. FINISHED!

So basically I want to create a blank page, fill it with some info on designated positions and get it as a .pdf - file.

If ANYONE knows how to do this, please contact me! Either reply here or mail me on Lommenn@gmail.com. I’m getting so frustrated cause combit got soo much manuals, movies, samples and help and even tho all that is there I cant seem to get this to work.

// Fredrik


(Guest) #2

In the .NET reference there’s an example that seems to do just that: 2.4.4. Print Card With Simple Placeholders.

(1a) Create a WinForms (!) app, in there create a ListLabel object and bind it to your required data object
(1b) Call up the Designer

The whole code for step (1) will be sth like

public class DataSource 
{ 
public string Text1 { get; set; } 
public double Number1 { get; set; } ... } 
// Prepare data source 
object dataSource = new DataSource { Text1 = "Test", Number1 = 1.234 }; 
ListLabel LL = new ListLabel(); 
LL.DataSource = new ObjectDataProvider(dataSource); 
LL.AutoProjectType = LlProject.Card; 
// Call Designer 
LL.Design(); 
LL.Dispose();

(2) Now go ahead and place your variables wherever you want on the workspace using drag & drop from the variable window. Save your project file

(3) Modify the ASP.NET sample to also use this exact data source and project type. Print using the Button.

That should (hopefully) work.

HTH
G.


(Guest) #3

This worked perfect!! Thanks alot, your a saviour in these dark rainy days in Sweden.