cancel
Showing results for 
Search instead for 
Did you mean: 

HTML Drill Down Report

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

aasavaribhave
Advisor
Advisor
0 Kudos

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?

Former Member
0 Kudos

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?