Jump to content
We've recently updated our Privacy Statement, available here ×

rajeevpv

Members
  • Posts

    4
  • Joined

  • Last visited

rajeevpv'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. jasper report - Integer field (mapped to oracle NUMBER column) is getting displayed with decimals. for eg, value 3 is getting printed as 3.00. How can we make it print as 3 itself.. thanks in advance.. Rajeev
  2. thanks a lot Lucian, it worked fine with the whereClause parameter as u suggested. but i didnt understand your tip on passing preparedstatment parameter. i tried changing the query to SELECT X,Y,Z FROM task WHERE $P!{IS_TRUE} OR STATUS = $P{STATUS} which will thro ORA-00920:ÂinvalidÂrelationalÂoperator exception. where IS_TRUE is defined as $P{STATUS}.equals("ALL") ? "true" : "false". i also have one more doubt, whats the difference between specifying parameter as $P{STATUS} and $P!{STATUS}. thanks, Rajeev
  3. hi, need help on constructing an SQL query. my requirement is something like this. generate a report on task ( with statuses RUNNING, COMPLETED, FAILED). The status is passed on from the screen (A combo box) and jasper will generate the report. The query i need to attach to the .jasper report is something like this. SELECT X,Y,Z FROM task_table WHERE status IN (CASE WHEN $P{STATUS}='ALL' THEN (SELECT different_tasks_statuses FROM FEPS.TASK_STATUS)ELSE $P{STATUS} END) where $P{STATUS} is the report parameter whose value is passed from the screen based on the combo box (drop down text) selection. i can create report if we query it for a specific status. but there is a special case, where when we select 'ALL' from the screen, report should fetch tasks belonging to all statuses (see the query condition in the above query). 1. i can do this by designing a separate report (separate query then) for this special case (passing ALL). but i dont want to do that since there are amny filter combos with 'ALL'. 2. neither can i pass a dynamic where clause to the query generator if somehow we can construct a string literal i think we can do this with a decode or case statement. if you have any clue, pls let me know fast. thanks, Rajeev
×
×
  • Create New...