Jump to content
Changes to the Jaspersoft community edition download ×

null value report for jsondatasource sample in Jaspersoft Studio


whong
Go to solution Solved by whong,

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

This is what I found. The data adapter is showing up as "One Empty Record" for the Json sample report to show null. Try picking "Sample DB" as the data adapter in the Preview tab before previewing. It seems Studio requires a data adapter connection despite the source of data is from JSON data file. This data connection is linked to the report template, JsonCustomerReport, which has a "com.jaspersoft.studio.data.defaultdataadapter" property. 

Or you can create a new JSON Data Adapter in Studio Repository explorer and point this to ..JasperReportsSamplesjsondatasourcedatanorthwind.json and select "Use the report JSON expresson when filling the report".

Note: you may (or may not) encounter an error with the OrderDate whilst previewing. If so, try changing the OrderDate type from java.util.Date to java.sql.Date in the Dataset and Query Dialog of the JsonOrderReport subreport and save and recompile to regenerate the .jasper.

Link to comment
Share on other sites

  • Solution

I found jsondatasource requests both below properities in the .jrxml to generate report in Jaspersoft Studio. 

<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>[/code]
[/code]
<property name="net.sf.jasperreports.json.source" value="northwind.json"/>[/code]

Thank you,

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