本文整理汇总了Java中net.sf.jasperreports.engine.export.JRXhtmlExporter类的典型用法代码示例。如果您正苦于以下问题:Java JRXhtmlExporter类的具体用法?Java JRXhtmlExporter怎么用?Java JRXhtmlExporter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JRXhtmlExporter类属于net.sf.jasperreports.engine.export包,在下文中一共展示了JRXhtmlExporter类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getExporter
import net.sf.jasperreports.engine.export.JRXhtmlExporter; //导入依赖的package包/类
@Override
protected JRXhtmlExporter getExporter(JasperReportsConfiguration jContext, JRExportProgressMonitor monitor, File file) {
JRXhtmlExporter exp = new JRXhtmlExporter(jContext);
exp.setExporterOutput(new SimpleHtmlExporterOutput(file));
SimpleHtmlReportConfiguration rconf = new SimpleHtmlReportConfiguration();
setupReportConfiguration(rconf, monitor);
exp.setConfiguration(rconf);
return exp;
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:12,代码来源:ExportAsXHtmlAction.java
示例2: export
import net.sf.jasperreports.engine.export.JRXhtmlExporter; //导入依赖的package包/类
/**
* Exports by MIME type.
*
* @param mimeType MIME type
* @param jp Jasper print
* @param os outputstream
* @throws JRException
*/
protected void export(String mimeType, JasperPrint jp, OutputStream os) throws JRException {
if ("application/pdf".equalsIgnoreCase(mimeType)) {
exportReport(new JRPdfExporter(), jp, os);
} else if ("text/xml".equalsIgnoreCase(mimeType)) {
exportReport(new HtmlExporter(), jp, os);
} else if ("application/rtf".equalsIgnoreCase(mimeType)) {
exportReport(new JRRtfExporter(), jp, os);
} else if ("application/xls".equalsIgnoreCase(mimeType)) {
exportReport(new JRXlsExporter(), jp, os);
} else if ("application/odt".equalsIgnoreCase(mimeType)) {
exportReport(new JROdtExporter(), jp, os);
} else if ("application/ods".equalsIgnoreCase(mimeType)) {
exportReport(new JROdsExporter(), jp, os);
} else if ("application/docx".equalsIgnoreCase(mimeType)) {
exportReport(new JRDocxExporter(), jp, os);
} else if ("application/xlsx".equalsIgnoreCase(mimeType)) {
exportReport(new JRXlsxExporter(), jp, os);
} else if ("application/pptx".equalsIgnoreCase(mimeType)) {
exportReport(new JRPptxExporter(), jp, os);
} else if ("text/xhmtl".equalsIgnoreCase(mimeType)) {
exportReport(new JRXhtmlExporter(), jp, os);
} else {
throw new IllegalArgumentException("JasperRenderer does not support " + mimeType + " MIME type.");
}
}
开发者ID:seedstack,项目名称:io-addon,代码行数:43,代码来源:JasperRenderer.java
示例3: getHtmlFragment
import net.sf.jasperreports.engine.export.JRXhtmlExporter; //导入依赖的package包/类
@Override
public String getHtmlFragment(JRHtmlExporterContext context,
JRGenericPrintElement element) {
Map<String, Object> contextMap = new HashMap<String, Object>();
contextMap.put("mapCanvasId", "map_canvas_" + element.hashCode());
if (context.getExporter() instanceof JRXhtmlExporter) {
contextMap.put("xhtml", "xhtml");
JRXhtmlExporter xhtmlExporter = (JRXhtmlExporter) context.getExporter();
contextMap.put("elementX", xhtmlExporter.toSizeUnit(element.getX()));
contextMap.put("elementY", xhtmlExporter.toSizeUnit(element.getY()));
} else {
JRHtmlExporter htmlExporter = (JRHtmlExporter) context.getExporter();
contextMap.put("elementX", htmlExporter.toSizeUnit(element.getX()));
contextMap.put("elementY", htmlExporter.toSizeUnit(element.getY()));
}
contextMap.put("elementId", element.getKey());
contextMap.put("elementWidth", element.getWidth());
contextMap.put("elementHeight", element.getHeight());
if (element.getModeValue() == ModeEnum.OPAQUE) {
contextMap.put("backgroundColor",
JRColorUtil.getColorHexa(element.getBackcolor()));
}
WmsRequestBuilder requestBuilder =
WmsMapElementImageProvider.mapRequestBuilder(element);
try {
contextMap.put("wmsMapUrl", requestBuilder.toMapUrl());
} catch (MalformedURLException e) {
throw new RuntimeException("Unable to build WMS map service url", e);
}
return VelocityUtil.processTemplate(MAP_ELEMENT_HTML_TEMPLATE, contextMap);
}
开发者ID:sourcepole,项目名称:jasperreports-wms-component,代码行数:36,代码来源:WmsMapElementHtmlHandler.java
示例4: xhtml
import net.sf.jasperreports.engine.export.JRXhtmlExporter; //导入依赖的package包/类
/**
*
*/
public void xhtml() throws JRException
{
long start = System.currentTimeMillis();
File sourceFile = new File("build/reports/ScriptletReport.jrprint");
JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".x.html");
JRXhtmlExporter exporter = new JRXhtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
exporter.exportReport();
System.err.println("XHTML creation time : " + (System.currentTimeMillis() - start));
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:22,代码来源:ScriptletApp.java
示例5: xhtml
import net.sf.jasperreports.engine.export.JRXhtmlExporter; //导入依赖的package包/类
/**
*
*/
public void xhtml() throws JRException
{
long start = System.currentTimeMillis();
File destFile = new File("target/reports/RrdGraph.x.html");
JRXhtmlExporter exporter = new JRXhtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, m_jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
exporter.exportReport();
System.err.println("XHTML creation time : " + (System.currentTimeMillis() - start));
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:19,代码来源:JRobinQueryExecuterTest.java
示例6: exportToHtml
import net.sf.jasperreports.engine.export.JRXhtmlExporter; //导入依赖的package包/类
public void exportToHtml() {
download(getFileName() + ".html", new JRXhtmlExporter());
}
开发者ID:alejandro-du,项目名称:enterprise-app,代码行数:4,代码来源:AbstractReport.java
示例7: getHandler
import net.sf.jasperreports.engine.export.JRXhtmlExporter; //导入依赖的package包/类
@Override
public GenericElementHandler getHandler(String elementName,
String exporterKey) {
if (WmsMapPrintElement.WMS_MAP_ELEMENT_NAME.equals(elementName)) {
if (JRGraphics2DExporter.GRAPHICS2D_EXPORTER_KEY
.equals(exporterKey)) {
return WmsMapElementGraphics2DHandler.getInstance();
}
if (JRHtmlExporter.HTML_EXPORTER_KEY.equals(exporterKey)
|| JRXhtmlExporter.XHTML_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementHtmlHandler.getInstance();
}
else if (JRPdfExporter.PDF_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementPdfHandler.getInstance();
}
else if (JRXlsExporter.XLS_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementXlsHandler.getInstance();
}
else if (JExcelApiExporter.JXL_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementJExcelApiHandler.getInstance();
}
// else
// if(JExcelApiMetadataExporter.JXL_METADATA_EXPORTER_KEY.equals(exporterKey))
// {
// return MapElementJExcelApiMetadataHandler.getInstance();
// }
else if (JRXlsxExporter.XLSX_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementXlsxHandler.getInstance();
}
else if (JRDocxExporter.DOCX_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementDocxHandler.getInstance();
}
else if (JRPptxExporter.PPTX_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementPptxHandler.getInstance();
}
else if (JRRtfExporter.RTF_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementRtfHandler.getInstance();
}
else if (JROdtExporter.ODT_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementOdtHandler.getInstance();
}
else if (JROdsExporter.ODS_EXPORTER_KEY.equals(exporterKey)) {
return WmsMapElementOdsHandler.getInstance();
}
}
return null;
}
开发者ID:sourcepole,项目名称:jasperreports-wms-component,代码行数:48,代码来源:ExtensionsRegistryFactory.java
示例8: xhtml
import net.sf.jasperreports.engine.export.JRXhtmlExporter; //导入依赖的package包/类
private void xhtml() throws JRException {
File destFile = new File("target/reports/ResourceTypeTest.x.html");
JRXhtmlExporter exporter = new JRXhtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, m_jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
exporter.exportReport();
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:11,代码来源:ResourceQueryExecuterTest.java
注:本文中的net.sf.jasperreports.engine.export.JRXhtmlExporter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论