当前位置: 首页>>代码示例>>Java>>正文


Java HTMLRenderOption.setHtmlPagination方法代码示例

本文整理汇总了Java中org.eclipse.birt.report.engine.api.HTMLRenderOption.setHtmlPagination方法的典型用法代码示例。如果您正苦于以下问题:Java HTMLRenderOption.setHtmlPagination方法的具体用法?Java HTMLRenderOption.setHtmlPagination怎么用?Java HTMLRenderOption.setHtmlPagination使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.birt.report.engine.api.HTMLRenderOption的用法示例。


在下文中一共展示了HTMLRenderOption.setHtmlPagination方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runAndRender

import org.eclipse.birt.report.engine.api.HTMLRenderOption; //导入方法依赖的package包/类
/**
 * Run and render the report, and return the render result.
 * 
 * @param designFile
 * @return render result.
 * @throws EngineException
 * @throws IOException
 */
protected String runAndRender( String designFile ) throws EngineException,
		IOException
{
	IRunAndRenderTask runAndRenderTask = createRunAndRenderTask( designFile );
	HTMLRenderOption options = new HTMLRenderOption( );
	ByteArrayOutputStream out = new ByteArrayOutputStream( );
	options.setOutputStream( out );
	options.setOutputFormat( "html" );
	options.setHtmlPagination( true );
	runAndRenderTask.setRenderOption( options );
	runAndRenderTask.run( );
	runAndRenderTask.close( );
	String result = new String( out.toByteArray( ) );
	out.close( );
	return result;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:25,代码来源:EngineCase.java

示例2: testGetHtmlPagination

import org.eclipse.birt.report.engine.api.HTMLRenderOption; //导入方法依赖的package包/类
/**
 * Test setHtmlPagination(boolean pagination) getHtmlPagination()
 */
public void testGetHtmlPagination( )
{
	HTMLRenderOption option = new HTMLRenderOption( );
	option.setHtmlPagination( true );
	assertTrue( option.getHtmlPagination( ) );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:10,代码来源:HTMLRenderOptionTest.java

示例3: render

import org.eclipse.birt.report.engine.api.HTMLRenderOption; //导入方法依赖的package包/类
/**
 * Render a report design file and return the result.
 * 
 * @param designFile
 * @return render result.
 * @throws EngineException
 * @throws IOException
 */
protected String render( String designFile ) throws EngineException,
		IOException
{
	HTMLRenderOption options = new HTMLRenderOption( );
	ByteArrayOutputStream out = new ByteArrayOutputStream( );
	options.setOutputStream( out );
	options.setHtmlPagination( true );
	options.setOutputFormat( "html" );
	render( designFile, options );
	String result = new String( out.toByteArray( ) );
	out.close( );
	return result;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:22,代码来源:EngineCase.java

示例4: getRenderResult

import org.eclipse.birt.report.engine.api.HTMLRenderOption; //导入方法依赖的package包/类
private String getRenderResult( String designFile, boolean pagination,
		boolean showMasterPage ) throws EngineException, IOException
{
	HTMLRenderOption options = new HTMLRenderOption( );
	options.setHtmlPagination( pagination );
	options.setMasterPageContent( showMasterPage );
	ByteArrayOutputStream out = new ByteArrayOutputStream( );
	options.setOutputStream( out );
	render( designFile, options );
	String content = new String( out.toByteArray( ) );
	out.close( );
	return content;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:14,代码来源:ReportPageReaderTest.java

示例5: run

import org.eclipse.birt.report.engine.api.HTMLRenderOption; //导入方法依赖的package包/类
void run(IReportRunnable reportRunnable, String format, TimeZone timeZone, String htmlType, String targetFile, JsonObject values)
        throws EngineException {

    ReportParametersInspector inspector = new ReportParametersInspector(reportEngine);
    List<IParameterDefnBase> parameters = inspector.getParameters(reportRunnable);

    Map<String, String> map = new HashMap<String, String>(parameters.size());
    flattenParameters(inspector, parameters, map);

    IRunAndRenderTask task = reportEngine.createRunAndRenderTask(reportRunnable);
    for(IParameterDefnBase param: parameters){
        String name = param.getName();
        if(values.containsKey(name)){
            setParameter(task, name, map.get(name), values.get(name));
        }
    }

    // set report render options
    IRenderOption options = new RenderOption();

    options.setOutputFormat(format);

    // setup the output file
    options.setOutputFileName(targetFile);

    // setup the application context
    if (format.equalsIgnoreCase("html")) {
        HTMLRenderOption htmlOptions = new HTMLRenderOption(options);
        if ("ReportletNoCSS".equals(htmlType)) {
            htmlOptions.setEmbeddable(true);
        }
        // setup the output encoding
        htmlOptions.setUrlEncoding(encoding);
        htmlOptions.setHtmlPagination(true);
        htmlOptions.setImageDirectory("image"); //$NON-NLS-1$
    }

    // set the render options
    task.setRenderOption(options);

    // setup the locale
    task.setLocale(getLocale(locale));
    task.setTimeZone(timeZone);
    task.run();
    task.close();
}
 
开发者ID:phuihock,项目名称:birtconn,代码行数:47,代码来源:ReportGenerator.java

示例6: renderHtmlReport

import org.eclipse.birt.report.engine.api.HTMLRenderOption; //导入方法依赖的package包/类
@Override
public void renderHtmlReport(String reportName,
		Map<String, Object> parameters, OutputStream out, long pageNumber,
		boolean overwrite) throws BirtReportException {
	try {
		String reportFileName = absolutePathOf(reportFileName(reportName));
		String documentFileName = absoluteTempPath(
				documentFileName(reportName));

		recreateReportDocument(reportName, parameters, overwrite,
				reportFileName, documentFileName);

		IReportDocument reportDocument = reportEngine
				.openReportDocument(documentFileName);

		HTMLRenderOption htmlOptions = new HTMLRenderOption();
		htmlOptions.setOutputFormat(IRenderOption.OUTPUT_FORMAT_HTML);
		htmlOptions.setOutputStream(out);
		htmlOptions.setImageHandler(new HTMLServerImageHandler());
		htmlOptions.setEmbeddable(true);

		htmlOptions.setBaseImageURL(baseImageURL);
		htmlOptions.setImageDirectory(imageDirectory);

		htmlOptions.setHtmlPagination(true);
		htmlOptions.setMasterPageContent(false);
		htmlOptions.setPageFooterFloatFlag(true);

		IRenderTask renderTask = reportEngine
				.createRenderTask(reportDocument,
						reportDocument.getReportRunnable());
		renderTask.setRenderOption(htmlOptions);
		renderTask.setPageNumber(pageNumber);

		injectLocale(renderTask);

		renderTask.render();
		renderTask.close();

	} catch (EngineException | IOException e) {
		throw new BirtReportException(e);
	}
}
 
开发者ID:interseroh,项目名称:report-cockpit-birt-web,代码行数:44,代码来源:BirtReportServiceBean.java


注:本文中的org.eclipse.birt.report.engine.api.HTMLRenderOption.setHtmlPagination方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。