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

LL20 error BAD_JOBHANDLE if DataSource is set

(Markus Accola) #1

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( …);

If I create a new LL-instance every time, my report is executed successfully.
Any ideas what I’m doing wrong?
Thank you

(Markus Accola) #2

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.

(Günther Schwarze) #3

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 .


(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 which can be found at http://www.combit.net/support. Please copy any pertinent information from this thread into the case description.

Thanks in advance and
Best regards,

Patrick Preuschoff
Technical Support
combit GmbH

(Markus Accola) #5

It’s very easy to reproduce (like mentioned in my last reply).
I have my very poor example attached.
Steps to reproduce

  1. Copy solution
  2. Change the path to the LST-file to your machine
  3. See event-handler “BtnDesignGenericList_Click” and involve the Dispose() member (commented out actually).
  4. Run the prog and use the Button “Design” right of the Label for the Item-List for two times.

Good Luck. Markus