Jump to content
Changes to the Jaspersoft community edition download ×

what is subdatasets...?


Recommended Posts

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

when u create the subdataset it makes a virtual db filter the way you set it to be, you then go to the subdataset property window by click, Data > Subdatasets > highlight subdataset wishing to use > Modify, after that there will be several buttons to the left, these buttons will allow you to make fields, variables, parameters, query, just click the one desired and make the object like normal, it is a long way to sort a database though, tell me what you are trying to do, I might have a better solution for you, post you jxrml file if you want and i will look at it.
Link to comment
Share on other sites

ok friend, thank you very much for your help.


i want know if the subdataset is using only for create Chart or Crosstab... because my main report not recognize the fields or parameters of my subdataset.


can i use the fields of my subdataset in my main report?




thank you.

Link to comment
Share on other sites

simply no, fields in ur subdataset are just that, you can use fields from ur main in the subdataset but not the other way around, you should how ever be able to use the the subdataset data in object on the main report, just have to make sure you are pulling from the subdataset for it.

Post edited by: Case1182, at: 2007/05/30 21:31

Link to comment
Share on other sites

  • 1 year later...

Hi Case1182,


Could you please tell me how to reference subdataset filed on the main layout? I have a subdataset defined with one filed and all i want is to show the value of that field on the report, but when i go to filed properties in the ireport it doesn't let me choose the filed from the subdataset only from main query...


please advice.


and one more question do you know if it is possible to run multiple queries in one report?

Link to comment
Share on other sites

  • 5 months later...

I think the issue I have is somewhat related to this thread and apologies for digging this up;

I have to execute two queries in a single report currently, and I cannot seem to type in query1;query2 in the main document's sql.

So what I did is that I created a subdataset and executed the second query there.

Everything looks good except that I cannot access the fields variable in the report.


Say if I have the followign as my query for the subdataset:

select field1 from table1 where date>$P{date}

Can I not access field1 via the $F{field1} variable in my main report ?

How would I go about showing the data returned by the subdataset ?

Any input will be greatly appreciated.




Link to comment
Share on other sites

It clearly indicated in the thread discussion but here it is again in a nutshell

1. The main report's SQL can only contain one query

2. The report can also contain a subdataset but this subdataset can only be use in a chart or crosstab of your report. It can not be access by the fields in your main report.

If you need more than one query in you report you can create a sub-report with you query and reference it in your main report.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...