Avatar of chrobi
chrobiFlag for United States of America

asked on 

JasperServer Issues..

Hello all..... I am a recent Crystal Reports Convert, so forgive me for i know not what I do........

 

Ok so this is what I am trying to accomplish.  I have one report that I want to support multiple tables.  I want to be able to let the user select the tables at run time.   My SQL statement looks like this:

SELECT
*
FROM
$P{store}
WHERE
value_char != ''  AND server_time >= $P{Start} AND server_time <= $P{End}

order by cashier, value_char,server_time

 

 

It was working correcly before i tried to get fancy with the "$P{store}" in the from part.  
 

Am I smoking crack thinking that I can accomplish this?

 

Thank you in advance for reading my request.
Java EE

Avatar of undefined
Last Comment
chrobi
Avatar of chrobi
chrobi
Flag of United States of America image

ASKER

Well I gave up on trying the fancy stuff.    So I moved the Select Statement to a stored procedure on MYSQL 5.0.45.  SO I rebuilt the report from the ground up and tested with the stored procedure.  All is good when I run the report in the IReport viewer using the stored procedure. When I uploaded to the jasper server it bombs with an error, this will be posted after the details on the report config and the server config.

 

The report has three input parameters Start_Date_Time (TimeStamp), End_Date_Time (TimeStamp), Table_Selection(Text)

The server has report unit with three input controls:

 

Start_Date_Time:  This input control has local defined Data Type configured as Date/Time.

End_Date_Time: This input control has local defined Data Type configured as Date/Time.

Table_Selection: This input control has local defined Data Type configured as Text.

 

When I run the report on the server I am prompted for my three inputs Start Date, End Date, and Table_Selection.  I enter the exact information that i had tested with in Ireport.  And I get the following error:

 

In the error log I see :

Caused by: java.sql.SQLException: Bad format for BigDecimal ' != "" ORDER BY


This tells me that i have a bad format, but I dont know what part  on the jasperserver to troubleshoot this any further.

Any and all help is greatly appreciated.

Chrobi

 

Error Log from server:


com.jaspersoft.jasperserver.api.JSExceptionWrapper: Unable to get value for field 'value_num' of class 'java.math.BigDecimal'

com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.JRException: Unable to get value for field 'value_num' of class 'java.math.BigDecimal'

{

Truncated Part

}

Caused by: java.sql.SQLException: Bad format for BigDecimal ' != "" ORDER BY
  ' at line 3ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý' in column 8.
    at com.mysql.jdbc.ResultSet.getBigDecimalFromString(ResultSet.java:1333)
    at com.mysql.jdbc.ResultSet.getNativeBigDecimal(ResultSet.java:2889)
    at com.mysql.jdbc.ResultSet.getNativeBigDecimal(ResultSet.java:2846)
    at com.mysql.jdbc.ResultSet.getBigDecimal(ResultSet.java:1151)
    at org.apache.commons.dbcp.DelegatingResultSet.getBigDecimal(DelegatingResultSet.java:301)
    at net.sf.jasperreports.engine.JRResultSetDataSource.getFieldValue(JRResultSetDataSource.java:215)
    ... 99 more

{

Truncated Part

}


net.sf.jasperreports.engine.JRException: Unable to get value for field 'value_num' of class 'java.math.BigDecimal'
Caused by: java.sql.SQLException: Bad format for BigDecimal ' != "" ORDER BY
  ' at line 3ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý' in column 8.
    at com.mysql.jdbc.ResultSet.getBigDecimalFromString(ResultSet.java:1333)
    at com.mysql.jdbc.ResultSet.getNativeBigDecimal(ResultSet.java:2889)
    at com.mysql.jdbc.ResultSet.getNativeBigDecimal(ResultSet.java:2846)
    at com.mysql.jdbc.ResultSet.getBigDecimal(ResultSet.java:1151)
    at org.apache.commons.dbcp.DelegatingResultSet.getBigDecimal(DelegatingResultSet.java:301)
    at net.sf.jasperreports.engine.JRResultSetDataSource.getFieldValue(JRResultSetDataSource.java:215)
    ... 99 more

{

Truncated Part

}


java.sql.SQLException: Bad format for BigDecimal ' != "" ORDER BY ' at line 3ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý' in column 8.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

check the types of your report columns
Avatar of chrobi
chrobi
Flag of United States of America image

ASKER

Objects....the report worked just fine in the Ireports IDE.  What would change between the Ireport IDE and the server?

Thanks...
Avatar of Mick Barry
Mick Barry
Flag of Australia image

nothing 'should' :)
are the same versions of jars being used by both?

Avatar of chrobi
chrobi
Flag of United States of America image

ASKER

Umm forgive me for asking how can i tell which jars are being use on the Ireporter and the Jasperserver?
Avatar of chrobi
chrobi
Flag of United States of America image

ASKER

I have checked all the jar files and the all got the same filesizes and names....  I am not sure what i am looking for to say the files are the same...
ASKER CERTIFIED SOLUTION
Avatar of chrobi
chrobi
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Java EE
Java EE

Java Enterprise Edition (Java EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. Java EE specifies server and client architectures and uses profiles to define technology sets targeted at specific classes of applications. All Java EE profiles share a set of common features, such as naming and resource injection, packaging rules and security requirements.

18K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo