Jump to content

Generated report returns NULL values in JasperServer

Recommended Posts


I'm facing an issue with a report that behaves differently in Jaspersoft Studio compared to JasperServer. In Jaspersoft Studio, the report works perfectly fine, but when I run the same report in JasperServer, it returns NULL values. The report is parameterized to generate data for different years.

The specific problem I'm encountering relates to dynamic column headers. I need the column headers to be generated dynamically based on the parameter value. Each column header should correspond to a specific year, as determined by the parameter. The report query calculates counts for different years, and I intend to display these counts under the corresponding column headers.

Here's what the relevant part of my SQL query looks like:

SELECT c.nazev AS oblastni_inspektorat,COALESCE(y5.count, 0) AS podnety_4_years_ago, COALESCE(y4.count, 0) AS podnety_3_years_ago, COALESCE(y3.count, 0) AS podnety_2_years_ago, COALESCE(y2.count, 0) AS podnety_last_year, COALESCE(y1.count, 0) AS podnety_current_year FROM ciselniky.inspektorat c

However, when I replace these dynamic column headers with static text, the report works correctly in both Jaspersoft Studio and JasperServer.

I've verified that the parameters are correctly defined and passed to the query. All configurations appears to be accurate. 

Is there anything I might be missing or overlooking? How can I ensure that the dynamic column headers work as intended in both Jaspersoft Studio and JasperServer?

Any insights or suggestions would be greatly appreciated. Thank you!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.

Link to comment
Share on other sites

  • 2 weeks 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...