Trust ID PBCEX logo 300x102

Problem with Storage-Item and Auto-printing

10 years 10 months ago
Ufot
Fresh Boarder
Fresh Boarder
Posts: 10
More
Topic Author
Problem with Storage-Item and Auto-printing #1176
Hi!

I´m using storage-items for auto-printing purposes. Everything is working fine but an error is always produced in the print log during auto-printing. The Cards are printed and looks just fine but this message keeps coming up. (Key value [XX] is not found.) The value XX refers to the primary key integer value of the printed row.

Basically my idea is that CardExchange monitors my MySQL database and looks for a column named "Printed" with the value NULL. When the card has been printed I would like to set the value of column "Printed" to whatever value except NULL. In that way I can see which cards are printed etc. My tables primary key is named "RowID" and my storage-item settings are in my image attachment.

As I said my cards are printed correctly and the column value for "Printed" is changed from NULL to 1 after printing. So why is the print log producing an error message when everything is working as expected? Could somebody please help me?

/ Johan
Attachments:
10 years 10 months ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
Problem with Storage-Item and Auto-printing #1177
Hi Johan,

I'm not totally sure, but it seems that this problem is somehow related to the use of filters. Probably, CardExchange is trying to read the record that has just been printed while a filter on the Printed column makes that impossible. Since the auto-print functionality is not respecting any filter settings anyway, I recommend to switch off any filters, especially those on the Printed column.

If you want to use additional filters in combination with the auto-print functionality, you can define those filters in the trigger definition. It is, for example, possible to change the standard trigger condition (IS NULL) to something more sophisticated (IS NULL AND [ActiveAccount] = 1, just to give an example).

I hope that helps you out. Could you tell me whether you were indeed using a filter on the Printed column and also which version of CardExchange you are running? Thanks.

Rutger Koperdraad
Senior Software Engineer

"A reasonable man adapts himself to the world. The unreasonable man persists in trying to adapt the world to himself. All progress, therefore, depends on the unreasonable man." (Bernard Shaw)
10 years 9 months ago
Ufot
Fresh Boarder
Fresh Boarder
Posts: 10
More
Topic Author
Problem with Storage-Item and Auto-printing #1187
Hi!

It seems that filtering caused the problem. I now moved all my filtering to the trigger condition and this solved the problem. :D

Thanks for your help.

/ Johan