Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Jasper Subreport problem

 
Ranch Hand
Posts: 99
  • 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
 
Greenhorn
Posts: 28
  • 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: 28
  • 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
  • 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
 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!