Skip to Content
author's profile photo Former Member
Former Member

HTML Drill Down Report

Hi,

I am using CR4E Ver 2.0.11.r1346.

I am producing HTML drill down report. My code for the same looks like..

CrystalReportViewer crystalReportViewer = new CrystalReportViewer();
				crystalReportViewer.setOwnPage(false);
				crystalReportViewer.setPrintMode(CrPrintMode.ACTIVEX);
				crystalReportViewer.setReportSource(reportClientDocument.getReportSource());
				HttpServletRequest request = (HttpServletRequest) parameters.get("httpServletRequest");
				HttpServletResponse response = (HttpServletResponse) parameters.get("httpServletResponse");
				String htmlContent = crystalReportViewer.getHtmlContent(request, response, request.getSession().getServletContext());
				output.setContent(htmlContent.getBytes());

For some reasons, I can not use

crystalReportViewer.processHttpRequest

.

My code generates the HTML report as expected but the drill down reports do NOT work. I tried to inspect and got that the HTML generated by

getHtmlContent

does not have the script tag

 event.js

. I added this script manually in generated content and tried to debug through, but it does not work.

Any clues?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 09, 2011 at 01:25 PM

    the drilling down can be done only using the standard dhtml viewer and not the html output produced by getHtmlContent. Are you getting any error on processHttpRequest?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks.

      I tried using

      processHttpRequest

      .

      This generates the same report but Drill down does NOT work.

      The code in my action class is...

      CrystalReportViewer viewer = new CrystalReportViewer();
      viewer.setOwnPage(true); 
      viewer.setPrintMode(CrPrintMode.ACTIVEX);
      //Get the report source object that this viewer will be displaying.
      IReportSource reportSource = (IReportSource)(httpServletRequest.getAttribute("ReportSource"));
      if (null != reportSource && servletContext != null) {
      	viewer.setReportSource(reportSource);
      	//Render the report.
      	viewer.processHttpRequest(httpServletRequest, httpServletResponse,
      			servletContext,
      			null);
      }

      Any clue?

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.