Results from Query not being displayed in report

0

I have a Query linked to a Report in Reports Server and I can see from the Tomcat logs that the SQL query is being run.  However, the report doesn't display any results.

If I put the same query into a <queryString> element within the JRXML file, I do see results.

Why would the same query work differently when using a Query compared with using a <queryString>?

 

Robert

 

robert.baldock's picture
Joined: Sep 17 2015 - 5:42am
Last seen: 4 years 2 weeks ago

Hi,

I think that I'm facing the same problem. I've been blocked by that for 2 weeks now. I really think that there is a bug behind.

http://community.jaspersoft.com/questions/952406/error-jrjdbcqueryexecut...

lio38 - 4 years 2 weeks ago

I'm not getting quite the same thing.  I don't have any warnings or errors, in fact I can see in the logs that the query is being run and seems to return the expected number of results:

2015-10-01 08:15:09,631 DEBUG ColumnDataCacheHandler,pool-4-thread-21:341 - Recorded cached data source of 2 records

2015-10-01 08:15:09,632 DEBUG ColumnDataCacheHandler,pool-4-thread-21:209 - adding cached data of size 0 for for [{datasetUUID:8a465670-cc4a-4270-965f-8efb86e33b71,queryMD5:d41d8cd98f00b204e9800998ecf8427e,},{subreportUUID:795a7626-f924-438e-ab9e-809a9bfe5c70,rowIndex:2,datasetUUID:8722a75e-dde5-4f2d-ad94-e1ec777a54d7,}]
 
2015-10-01 08:15:09,632 DEBUG ColumnDataCacheHandler,pool-4-thread-21:209 - adding cached data of size 2 for for [{datasetUUID:8a465670-cc4a-4270-965f-8efb86e33b71,queryMD5:d41d8cd98f00b204e9800998ecf8427e,}]
 
2015-10-01 08:15:09,632 DEBUG ThreadPoolSubreportRunnerFactory,pool-4-thread-21:90 - shutting down java.util.concurrent.ThreadPoolExecutor@27202a40[Running, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 1]
 
2015-10-01 08:15:09,632 DEBUG AsyncJasperPrintAccessor,pool-4-thread-21:256 - report finished
 
However, I also see these entries in the log:
 
2015-10-01 08:15:09,626 DEBUG JRVerticalFiller,KHUB Report 1 subreports #1:135 - Fill 2: no data
2015-10-01 08:15:09,627 DEBUG JRVerticalFiller,KHUB Report 1 subreports #1:211 - Fill 2: no pages
 
Which is presumably why the report is displaying a blank page.
 
 
Robert
 
robert.baldock - 4 years 2 weeks ago

2 Answers:

0

You can check data being fetched by selecting "Data Preview" tab and selecing "Refresh Preview Data" button in Dataset and Query dialog. Check if you don't have any filter set.

hozawa's picture
50973
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 months 1 week ago
0

Thanks hozawa but the only place I see in JSS where you can link a report to a Query held in a server's repository is when you publish it to the server and you are asked to choose a Datasource or a Query.  But I don't see an option to preview it there.  How do I link a report to a remote Query before publishing the report?

 

Robert

 

robert.baldock's picture
Joined: Sep 17 2015 - 5:42am
Last seen: 4 years 2 weeks ago
Feedback