• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jasper Subreport problem

 
Viidhya Kishore
Ranch Hand
Posts: 99
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I am new to Jasper and would like your help on something.
I am having a main report which retrieves some disease and total$ spent on them.
I wrote a subreport which retrieves all the info(projects) for that disease.
I need to show the report as :
Disease Total($)
Brain Cancer 100
Brain Cancer Research 75
Brain Cancer study 25

Now my Subreport sql retrieves disease name(Brain Cancer) and the details
i.e the record looks like :
Brain Cancer Brain cancer Research 75
Brain Cancer Brain cancer Study 25

My problem is :
I am not able to put the condition for the subreport.
My thought is : the condition is to be like....if $P{disease} = $F{disease}
then print the line.

Can you please throw some light on this?
I hope I am clear.

Thanks,
-Viidhya
 
Vijaya Bhaskar
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vijaya Bhaskar:
[QB][/QB]


Yes,just you need to pass Field value from Main Report to the subReport's parameter ....
 
Vijaya Bhaskar
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vijaya Bhaskar:


Yes,just you need to pass Field value from Main Report to the subReport's parameter .... if you want in detail just give a reply
 
Viidhya Kishore
Ranch Hand
Posts: 99
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
But how do I control the display of the sub report?
I mean,I need the sub report to be displayed for every disease.
How do I specify that condition?


-Viidhya
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic