in this sample I have 3 files
1- test3.mrt =====> it's designed in Stimulsoft Report Design 2019.1.1 Trial with one Parameters
2- Test.xlsx =====> it's a Sample data in Excel
3- test3.war =====> it's a War file after publish in Stimulsoft Report Design to Java and Uploaded in eclips
I can't Attach these files so I uploaded on another site the put here...
http://up44.ir/wkky95ti
http://up44.ir/wyza2x7l
so I want to show this report in Java but the parameter Variable dosen't work
this is my index.jsp file
Code: Select all
<!DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@page import="com.stimulsoft.webviewer.enums.StiWebViewerTheme"%>
<%@page import="com.stimulsoft.report.dictionary.databases.StiJsonDatabase"%>
<%@page import="com.stimulsoft.report.dictionary.databases.StiXmlDatabase"%>
<%@page import="com.stimulsoft.report.dictionary.databases.StiJDBCDatabase"%>
<%@page import="java.io.FileOutputStream"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.net.URL"%>
<%@page import="com.stimulsoft.webviewer.StiWebViewerOptions" %>
<%@page import="com.stimulsoft.webviewer.StiWebViewer" %>
<%@page import="java.io.File" %>
<%@page import="com.stimulsoft.report.StiSerializeManager" %>
<%@page import="com.stimulsoft.report.StiReport" %>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib uri="http://stimulsoft.com/webviewer" prefix="stiwebviewer" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<title>test3.mrt - Viewer</title>
</head>
<body>
<%
final String reportPath = request.getSession().getServletContext().getRealPath("/reports/test3.mrt");
StiReport report = StiSerializeManager.deserializeReport(new File(reportPath));
report.getDictionary().getVariables().get("country").setValue("");
report.getVariables().put("country", "");
report.render();
StiWebViewerOptions options = new StiWebViewerOptions();
options.setLocalization(request.getSession().getServletContext().getRealPath("/localization/en.xml"));
pageContext.setAttribute("report", report);
pageContext.setAttribute("options", options);
%>
<stiwebviewer:webviewer report="${report}" options="${options}" />
</body>
</html>