I’ new to the .NET component and have some problems using LL20 in my VS2012 .NET4 project.
I have read the programmers manual and use one LL singleton instance in my report manager class (which is also a singleton).
My LL list-project print s simple list of employee base data. If I execute the following lines of code for the second time I get LL_ERR_BAD_JOBHANDLE if the DataSource-property is assigned the second time.
this.reportData = new List();
… some EmployeeData are added to the list
this.LL.DataSource = new ObjectDataProvider( this.reportData); // --> LL_ERR_BAD_JOBHANDLE
this.LL.Print( …);
this.reportData.Clear();
this.LL.Dispose();
If I create a new LL-instance every time, my report is executed successfully.
Any ideas what I’m doing wrong?
Thank you
Markus
Don’t call Dispose() after each printing for the LL-instance if this is your global singleton instance like printed in the programmers manual short examples.
Call Dispose() just once at the end of your program.
Interesting. I seem to remember that the suggestion was actually to have one global singleton and then a new instance for each print or design job. Can’t remember the reasoning behind it but that’s the way it’s implemented in our applications.
If it works - don’t change it .
G.
ppreuschoff
(combit Support - Patrick Preuschoff)
4
Hello Markus,
thank you for your post.
Since we are not able to reproduce the problem by ourselves we would like to ask you to contact us via our support portal.
Please copy any pertinent information from this thread into the case description.