Project

General

Profile

Defect #365

Jasper Casting from Integer to Long

Added by Scott Butler over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Urgent
Start date:
08/31/2011
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

The bug is described by another user here: https://www.servoyforge.net/boards/13/topics/262
We are experiencing this same problem. Using MySQL, Servoy 5.2.9 and Jasper plugin v320 using a foundset report. We use an integer field for sorting in Jasper. It is defined in Servoy and Jasper as Integer. However we get the error: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer. If you exit the client and open again, it works. Then if you modify a record, and enter in a larger value, like >100, and run the report again, it fails.

Also as the other topic suggest, using databaseManager.refreshRecordFromDatabase before printing will fix it, but obviously we don't want to do that before every report.

History

#1

Updated by Rob Gansevles over 12 years ago

Scott,

Please create a small sample report and solution that shows this.
Also include the sql to create the table.

Rob

#2

Updated by Scott Butler over 12 years ago

I emailed you a sample solution. The problem seems to be that if you have a Sort set on a Datasource in your Jasper report, and you also allow the user to edit that same column in Servoy which is being used as the sort in Jasper.

#3

Updated by Harjo Kompagnie over 12 years ago

Hi, we had the same issue, when we went from hasMaps (to put in parameters) to new Object()

We reverted back to using hasmaps, and the problem was gone...
Maybe this helps.....

#4

Updated by Andrei Costache over 12 years ago

  • Assignee set to Andrei Costache
  • Client type set to Any
  • In developer? set to No
  • Servoy version set to 5.2.x
  • OS version set to Windows Vista
  • Java version set to 1.6

Fixed in the plugin code.

#5

Updated by Andrei Costache over 12 years ago

  • Status changed from New to Closed

Also available in: Atom PDF