Quantcast
Viewing all articles
Browse latest Browse all 893

Verify Database not working!

Hello everyone,

 

I have a requirement for a database to be verified everytime the report is run, because of the dynamic nature of the data behind the report.  However, the ReportClientDocument.verifyDatabase() is not behaving as I think it should.  I assume it should behave the same as using the 'Verfy Database' comand within CR2008. 

 

NOTE:  The report works PERFECTLY without the verifyDatabase() command.  But because of the dynamic nature of the data you have to keep using 'Verify database' via the CR2008 designer!  This is not sustainable.

 

Here is my JSP, I will post the error separately for readability:

 

  //SOME IMPORT DONE HERE  CrystalReportViewer crystalReportViewer;  ReportClientDocument reportClientDocument;  Object reportSource;  ParameterFieldController parameterFieldController;    String reportType = request.getParameter("reporttype");  if (reportType == null) {    reportSource = session.getAttribute("reportSource");  }  else {   String reportPath = request.getParameter("report");   String DB_USER_NAME = new String(Base64.base64ToByteArray(request.getParameter("dbusername")));   String DB_PASSWORD = new String(Base64.base64ToByteArray(request.getParameter("dbpassword")));   reportClientDocument = new ReportClientDocument();   reportClientDocument.open(reportPath, OpenReportOptions._openAsReadOnly);   reportClientDocument.getDatabaseController().logon(DB_USER_NAME, DB_PASSWORD);     IStrings subreportNames = reportClientDocument.getSubreportController().getSubreportNames();  for (int i = 0; i < subreportNames.size(); i++) {    ISubreportClientDocument subreportClientDoc = reportClientDocument.getSubreportController().getSubreport(subreportNames.getString(i));    subreportClientDoc.getDatabaseController().logon(DB_USER_NAME, DB_PASSWORD);
 }        reportClientDocument.verifyDatabase();

// SOME PARAMETERS SET HERE

  reportSource = reportClientDocument.getReportSource();    reportClientDocument.close();  }

 

Does anyone have any examples of how to use the verifyDatabase, or can you see where I am going wrong?

 

Best Regards

 

Nick Hirst


Viewing all articles
Browse latest Browse all 893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>