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

chaddn

Members
  • Posts

    31
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by chaddn

  1. OK, I tried this and it still doesn't seem to pass the prompted value to my subdataset query. It shows a ? where my $P{feid_sub} is in the query. There's a txt file attached with a paste from the output console, I'm just trying the preview from within iReport, using the built-in viewer. If I enter a valid value in the query instead of the $P{feid_sub}, the query works as expected. So I know the query is good. Latest jrxml is also attached. Any ideas why the param isn't getting passed? Thanks for your help! Chadd
  2. I am using iReport 3.0.0 I have a crosstab report that I need to pass a parameter to (customer id). Basically I want the user to be able to type in a customer ID and that value will be used in the query for the subdataset that drives the crosstab. I looked at a few threads I found on here, but they don't fully explain how to do this. From what I've read, I need to setup a parameter in my main report {feid_main} and use that to prompt the user for the customer ID value. Then I setup a parameter in the subdataset {feid} and set the default value expression to the main parameter $P{feid_main}. This doesn't work. I get an "Error filling print...Error preparing statement for executing the report query". It returns the query and where the value from my parameter entry should be, there is instead a "?". Unfortunately it seems the subdataset cannot access the parameters in the main report, so no value is passed on. Am I missing a step here, or is there a better way to do this? My jrxml is attached..
  3. Great, changing the text field to String worked.. However, now I lost my ability to apply a pattern to the integer. I would like the numbers to format like 1,234 if positive and (1,234) if negative. Is there away to do that now that the field is a string? Thanks for your help! Chadd
  4. I have several crosstab reports I need to setup in iReport v 3.0.0 and for a specific field I would like all negative values to show in a red font color when you view the report. I got some code from the following thread, but I'm having trouble getting it to work. http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=25350 The field I want to have this conditional text color is a variable sum, type is integer (in the query, the element, and the crosstab object). Here's the code I'm using in the "Text Field Expression" for the element in the crosstab. $V{diff_Sum}.intValue() < 0? "<style forecolor='#ff0000'>" + $V{diff_Sum}.toString() + "</style>" : "<style forecolor='#0000ff'>" + $V{diff_Sum}.toString() + "</style>" When I run the report I get the error message "Cannot cast from String to Integer". Also, please note I do have the "Is styled text" box checked under the font tab of the element. Any help would be greatly appreciated. Thanks, Chadd Post Edited by Chadd Nelson at 01/22/09 19:07
×
×
  • Create New...