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

Can't open old report with LL21


(Cady Huynh) #1

Hi,

I just installed LL21. I am writing a C# program to open LL Designer. However I have very old LL reports (LL12). When I run the program, I get error.

The project file cannot be read
Possible Reasons:
-it is password-protected
-it has an invalid format or
-it was created with a newer version of the software.

None of the above reason would apply to my case.
This is the code sample:
using (FileStream fs = File.Open(sTemplateFile, FileMode.))
{
switch (sTemplateFile.Substring(sTemplateFile.Length - 3, 3))
{
case “lst”:
LL.Design(LlProject.List, fs);
break;
case “crd”:
LL.Design(LlProject.Card, fs);
break;
case “lbl”:
LL.Design(LlProject.Label, fs);
break;
}
}

Am I missing something (I am new to C#)? Is there other possible reason?
If I use Sample Designer and open this file, it will ask me to migrate to newer version and it will open but through the code it doesn’t.

Thanks for your help,
Cady


(Günther Schwarze) #2

Can you check if the file opens in the “traditional” way, i.e. without a filestream? Simply try a

LL.AutoProjectFile = sTemplateFile;
LL.AutoShowSelectFile = false;
LL.AutoProjectType = LlProject…
LL.Design();

This is written from the top of my head, maybe the props are called slightly different. Also, I had this effect once with a file that had a “CRD” extension but started with [ListProject] in the project file - a mismatch.

HTH

G.


(Cady Huynh) #3

Thanks for tip but I still get the same problem.
I will try to see what other options I have.
This will be a big problem if I can’t open it. We have 100 documents from version 12 to migrate to version 21 :frowning:


(Günther Schwarze) #4

You could log the issue and check the log file - most of the time it contains useful information.


(Cady Huynh) #5

Found it.
It needs the ‘FileAlsoNew’ in
LL.AutoProjectType = LlProject.List | LlProject.FileAlsoNew;