Quantcast
Channel: SCN : Popular Discussions - SAP Crystal Reports, version for Eclipse
Viewing all articles
Browse latest Browse all 893

Crystal Reports SDK \ Report with XML Datasource doesn't refresh data in WebApp

$
0
0

Crystal Reports SDK \ Report with XML Datasource doesn't refresh data in WebApp

 

Good afternoon!

 

I'm trying to render a Crystal Report with a XML Datasource using the Java Runtime SDK for Crystal.

 

In the Crystal Reports XI App when I refresh the Parameters it reloads with new data, but when I do the same action in the WebApp  (Typing new data into parameters), the report loads the same data everytime.

 

This is my full code.

 

/************* CODE **************/

 

<%@page contentType="text/html"%>

<%@page pageEncoding="UTF-8"%>

<% //Crystal Java Reporting Component (JRC) imports.%>

<%@page import="com.crystaldecisions.sdk.occa.report.reportsource.*" %>

<%@page import="com.crystaldecisions.sdk.occa.report.lib.*" %>

<%@page import="com.crystaldecisions.sdk.occa.report.data.*"%> 

<%@page import="com.crystaldecisions.report.web.viewer.*"%>

<%@page import="com.crystaldecisions.reports.sdk.*" %>

<%@page import="com.crystaldecisions.reports.reportengineinterface.*"%>

<%@page import="com.crystaldecisions.sdk.occa.report.exportoptions.*" %>

 

 

<% //Java imports. %>

<%@page import="java.io.*" %>

 

 

<%

  String reportName = "reporteFacturas.rpt";

 

 

  try {

  //check to see if the report source already exists

  Object reportSource = null; //Force to create the Report

 

 

  //if the report source has not been opened

  if (reportSource == null) {

  //---------- Create a ReportClientDocument -------------

  ReportClientDocument oReportClientDocument = new ReportClientDocument();

 

 

  //---------- Set the path to the location of the report soruce -------------

  //Open report.

  oReportClientDocument.open(reportName, 1);

 

 

  //Get the report source

  reportSource = oReportClientDocument.getReportSource();

  //session.setAttribute("reportSource", reportSource);

 

 

  //Cache report source.

  //This will be used by the viewer to display the desired report.session.setAttribute("reportSource", reportSource);

  CrystalReportViewer crv = new CrystalReportViewer();

  crv.setName("Crystal_Report_Viewer");

  crv.setReportSource(reportSource);

 

 

  //Passing parameters

 

 

  crv.setHasRefreshButton(true);

  crv.setDisplayGroupTree(false);

  crv.refresh(); //Ask for parameters

 

 

  crv.processHttpRequest(request, response,

  getServletConfig().getServletContext(), out);

 

 

  crv.dispose();

  }

  //Redirect to the viewer page.

  //response.sendRedirect("CrystalReportViewer.jsp");

 

 

  } catch (ReportSDKException e) {

  out.print(e);

  }

%>

/************* CODE **************/

 

Anyone could help me?

 

I've lost a lot of time trying to solve this.


Viewing all articles
Browse latest Browse all 893

Trending Articles



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