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

Migration ListLabel12 to ListLabel21

I have the following problem.
I inhereted a project from my colleague (retired). The project was written using ListLabel12. This ListLabel12 version works well.
Now I have license for ListLabel21. I want to reuse (port) the code with ListLabel21.
The project is written in C# (Microsoft VisualC# 2010). It is a DLL-project.

In fact I think my problem can probably be reduced to the question
“How to display a .ll file using ListLabelL21 in listLabelPrevireControl ?”

The most critical part (i.e. the part which does not work after porting to ListLabel21
can be described as follows:
Input: files ReportPart_1.ll, ReportPart_2.ll
Step 1: Create corrsponding files ReportPart_1.ll, ReportPart_2.ll
Step 2: 2.Create file ReportAll.ll which is “concatenation” of ReportPart_1.ll, ReportPart_2.ll
Step 3. Display the file ReportAll.ll

I have no problems in Step 1 and Step 2. The problem is Step 3.

Starting from LiatLabel12 version I did the following steps:

  1. In project replaced reference to “ListLabel12unicodeVS2005.dll” with reference to “combit.ListLabel21.dll”
  2. In source code I replaced all occurrences of string “combit.ListLabel12” with “combit.ListLabel21”
  3. I replaced line “this.LL.LicensingInfo = <old_key>;” with line “this.LL.LicensingInfo = <new_key>;”
  4. I replaced all occurrences of “LL.AutoDesignerFile = <something.lst>” with “LL.AutoProjectFile = <something.lst>”

My project is now compile clean ans runs without any crash. However the FUNCTIONALITY is not correct.
Schematically, my steps are as follows (I describe here a very simplified version, however it demonstrates the core of the problem.

Variables LL and listLabelPreviewControl1 are defined in file Form1.Designer.cs as usually:

private combit.ListLabel21.ListLabel LL; private combit.ListLabel21.ListLabelPreviewControl listLabelPreviewControl1;

In file Form1.cs I have the following code:

[code]string LSTPath=@“C:\MyReports\LST”;
string LLPath= @“C:\MyReports\LL”;
List myListDummy = new List();myListDummy.Add(1);

// Create file ReportPart_1_X.ll
LL.AutoProjectFile = LSTPath + “ReportPart_1.lst”;
LL.DataSource = myListDummy;
System.IO.File.Copy(Path.Combine(LLPath, “ReportPart_1.ll”),
Path.Combine(LLPath, “ReportPart_1_X.ll”), true);

// Create file ReportPart_2_X.ll
LL.AutoProjectFile = LSTPath + “ReportPart_2.lst”;
LL.DataSource = myListDummy;
System.IO.File.Copy(Path.Combine(LLPath, “ReportPart_2.ll”),
Path.Combine(LLPath, “ReportPart_2_X.ll”), true);

// Create file ReportAll.ll" (Append all LL-files to a single LL-file)
System.IO.File.Copy(LLPath + “ReportPart_1_X.ll”,
LLPath + “ReportAll.ll”, true);
PreviewFile myFile = new PreviewFile(LLPath + “ReportAll” + “.ll”, false);
myFile.Append(LLPath + “ReportPart_2_X.ll”);
System.IO.File.Copy(Path.Combine(LLPath, ReportAll.ll"),
Path.Combine(LLPath, ReportAll_X.ll"), true);[/code]

I want to display (preview) the file ReportAll_X.ll" with this function:

[code]private void PreviewCertificate(){
string tmpName = Path.Combine(LLPath, ReportAll_X.ll"), true);
listLabelPreviewControl1.FileName = tmpName;

    // the following line shows tmpName= C:\MyReports\LL\ReportAll_X.ll
    MessageBox.Show("tmpName=" + tmpName);

    // SURPRISE ???
    // The following line shows listLabelPreviewControl1.FileName=C:\MyReports\LL\ReportPart_2_X.ll
    MessageBox.Show("listLabelPreviewControl1.FileName=" + listLabelPreviewControl1.FileName);



I expected that ReportAll will be displayed, Hower Report_2 is displayed.
Files ReportPart_1_X.ll, ReportPart_2_X.ll, ReportAll.ll are correct (they contain only simple labels, no cooperation with database or something similiar). I am able to display them correctly with program “C:\Program Files\combit\LL21\Programmable Samples and Declarations\Visual Basic\Viewer Example”
I think the problem is in function PreviewCertificate(). I am sure something is wrong here while the first MessageBox in function PreviewCertificate() displays
tmpName= C:\MyReports\LL\ReportAll.ll
and the second MessageBox in function displays

In fact my problem is probably only “How to display a .ll file using ListLabelL21 in listLabelPrevireControl ?”
I will appreciate any hint.

Hi Juraj,

I am doing migration as well. I don’t see what wrong with your code but here is what I have done and it works.
Instead of LL.Print(), I do
//Create preview files
ExportConfiguration xportConfig = new ExportConfiguration(LlExportTarget.Preview, targetFile, templateFile)
xportConfig.ShowResult = false;

My append code is the same as yours.


© combit GmbH