Jump to content
Changes to the Jaspersoft community edition download ×

gbaldeck87

Members
  • Posts

    5
  • Joined

  • Last visited

gbaldeck87's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi Raviraj, yes I ran the query with parameters in SQL Developer. It works fine. I'm thinking it has to do with how I'm using the parameters but I've tried so many different things now that I don't know what to do next. Looking at how I'm passing the parameters do you see where I could be going wrong? Particularly with the way I'm using the single quotes around the parameters and the exclamation marks.
  2. I have a query in a report I'm creating which is throwing the following error: Caused by: java.sql.SQLSyntaxErrorException: ORA-00936: missing expressionat oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) I've been messing around with my query syntax but I can't seem to get anything to work. Here's my query:http://pastebin.com/26vm5V1F I made a pastebin because the code block option keeps messing with my formatting. The only difference there is imagine every line is surrounded by quotes except for the lines that have a paremeter. Like the lines that have +$P{V_LIMIT_AL}+ and +$P{V_LIMIT_BY_AL_TYPE}+. I removed the quotes around the query lines so that the SQL formatting would make it easier to read. The actual query is in a parameter called $P{REPORT_QUERY} which is passed to the report in the DataSet and Query editor dialog as $P!{REPORT_QUERY} (notice the exclamation mark) . Which is why there are quotes around the lines in the parameter's expression editor. My guess is that somehow the $P{V_LIMIT_AL} and $P{V_LIMIT_BY_AL_TYPE} parameters are not being evaluated by the query properly. Here's what I have for eaches default value expression. Query Link-----------------http://pastebin.com/26vm5V1F $P{V_LIMIT_AL}----------------------------$P{airlineId} != null && !$P{airlineId}.equals("") ? " AND A.AIRLINE_ID = /'$P!{airlineId}/' " : ($P{airlineName} != null && !$P{airlineName}.equals("") ? " AND C.COMPANY_NAME = /'$P!{airlineName}/' " : "")[/code] $P{V_LIMIT_BY_AL_TYPE}----------------------------------------$P{airlineType} != null && ($P{airlineType}.equals("Cargo") || $P{airlineType}.equals("Passenger")) ? " AND S.STAT_DC1 = /'$P!{airlineType}/' " : ""[/code] Can you see anything wrong with how I have my query setup and how the parameters are being passed to it?
  3. Some background first. I'm using Jaspersoft Studio 5.6.0 Final and have followed the instructions here to setup log4j. I'm trying to get log4j to output the SQL query when my report is run. I have a problem with the query and need to see the SQL outputed by Jaspersoft Studio. I have a working datasource setup so connection to the datasource is not a problem. I thought that following the instructions at the link above and then adding log4j.logger.net.sf.jasperreports.engine.query.JRJdbcQueryExecuter=debug to my log4j-config.properties file would let me see the output SQL, but it's not working. To run the report I compile the jrxml and then click the preview tab. Since I followed the instructions in the link above, shouldn't the SQL be outputed to my log4j log file when I do that? I need to get this working so I can fix my query. Any help is greatly appreciated.
  4. I am creating a report where a query returns a list of values which are being used in my detail band. A new value shows for each record like it should. I'm trying to sum up these values and then use them in a calculation on the same line. Heres an example: Color Fruit # of fruit Percent of total --------------------------------------------------------------- red apple 4 57% green apple 3 43% Total apples 7 The column being summed is the # of fruit or 3rd column. You can see the total at the end. Then the percent of total is the # of fruit for that row divided by the total. So for the first row it's 4 / 7 which equals 57%. The problem is that I can't get the total until all the fruit has been summed. But I need that total to be used on each row for the Percent of total column. How can I do this?
  5. Hi all, I have a java application that usually gets run using java webstart. Right now when I run a certain Jasper report from my application I get an out of memory exception, but only when the application is run using webstart. When I run my application from my local machine, not using webstart, the out of memory exception doesn't happen. Some of the things I've done is tried moving all the subreports from header and footer bands to detail bands (using iReport). I've also made sure that cache is being used in all the subreports. What else can I do in this case to get this memory exception to stop happening in the report?
×
×
  • Create New...