Jump to content
Changes to the Jaspersoft community edition download ×

Using variables, parameters, & fields from a sub data set in chart properties


katelyn

Recommended Posts

In Ireport Professional 5, I have several charts that are generated by data in a sub dataset.  I would like to update chart properties based on the data in the sub data set that is filling the chart or other variables, parameters, fields, etc in that sub data set but I can't.  Is there anyway to access varables, parameters, or fields from a sub data set outside of that dataset or even just for the properties of the objects that are connected to the dataset?  

 

 

 

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

When you create a chart with subdataset then you need to assign a Subdataset to that chart otherwise it will take a main dataset by default.

So when you assign a subdataset to a chart then whatever the parameter, variables and fields that you used is used for chart.

Link to comment
Share on other sites

But they aren't available for the styling of the chart. For example, if I try to use a subdataset field in a "Print when Expression" for a chart, I get an error saying the field is not found. Even if that subdataset is connected to that chart and is filling it with data. I want to be able to style the charts with variables, parameters, fields, etc from the subdataset.

 

Link to comment
Share on other sites

If you are using parameters of subdataset in chart and it gives null values then check that you map parameters in the chart.

In chart properties where you set dataset for chart check that you map subdataset parameter with main dataset parameter.

May be if parameter not mapped then query in the subdatase gives null values for all fields and variables.

Let me know if yuo already done that.

Link to comment
Share on other sites

I do have a parameter in the subdataset that I have mapped to the main dataset within the chart data pop-up window.  The subdataset is not returning null for all parameters, fields, and variables because the chart correctly fills with data.  I just cannot use that data to alter the look and feel of the chart.  I can't use those fields, parameters, and variables for any of the chart's properties.  

"I try to use a subdataset field in a "Print when Expression" for a chart, I get an error saying the field is not found. Even if that subdataset is connected to that chart and is filling it with data. "

Link to comment
Share on other sites

  • 4 years later...
  • 2 months later...

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...