SAP BO报表数据导出
2013-04-23 14:16
387 查看
Check if the document has been refreshed
If there are mandatory prompts that are not answered, setPrompts() will not refresh document. If so we print error message.if (doc.getMustFillPrompts()) { System.out.println("ERROR: Mandatory prompts has not been entered"); }
Also it is possible that there are multiple contexts and one need to be selected in order to run the document. In most cases the documents are designed to avoid prompting about contexts, so here we assume that there is no need to select one. But just in case,
we check this also.
if (doc.getMustFillContexts()) { System.out.println("ERROR: Context has not been selected"); }
Export to PDF
We can export complete document, a report of the document, or data providers.For instance to export the document to PDF, we can get view in the PDF format and write the contents to a file.
BinaryView binaryView2 = (BinaryView)doc.getView(OutputFormatType.PDF); String title = infoObject.getTitle(); writeBytes(binaryView2.getContent(), title + ".pdf");
Here we use an auxiliary function that writes byte array to a file.
public static void writeBytes(byte[] data, String filename) throws IOException { File file = newFile(filename); FileOutputStream fstream = new FileOutputStream(file); fstream.write(data); fstream.close(); }
Exp
相关文章推荐
- 数据报表导出功能改进
- 对数据进行报表导出
- 如何导出SAP的数据表字段
- Java程序员从笨鸟到菜鸟之(一百零四)java操作office和pdf文件(二)利用POI实现数据导出excel报表
- .Net 以报表的形式加载SAP里面的数据
- SAP BO 报表和FineUI(ASP.NET)的无缝集成
- 润乾报表数据导出时的等待提示
- 水晶报表导出数据并实现打印
- 简单入门: 如何用Adobe Form来展示SAP报表数据
- 抓取SAP报表ALV GRID上的数据
- ExtJS终极UI-CRUD、报表、导入、导出、数据模板式导入数据
- 导出/打印项目数据报表需要设置IE浏览器
- PB 数据窗口导出EXCEL报表-个人例子
- 【推荐】.NET(webform,MVC)使用NPOI组件将数据导出、导入Excel。 Aspose.Cell 控件报表
- 百灵报表(BIRT)接口学习:使用Data Extraction Task导出数据
- Java使用POI实现数据导出excel报表
- 报表 将数据导出excel格式 且数据量超小
- SAP后台执行大数据量报表(鹦鹉学舌篇)
- C# 操作EXCEL导出数据报表的类
- 在.NET环境下将报表数据导出EXCEL和WORD