首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何从BO java SDK读取crystal reports类信息

如何从BO java SDK读取crystal reports类信息
EN

Stack Overflow用户
提问于 2013-05-20 17:56:15
回答 1查看 1.4K关注 0票数 3

我使用的是水晶报表BO R4。我正在尝试阅读crystal reports元数据信息。我可以得到列和表的名称,其中有源xml,excel。我如何读取来源为宇宙的水晶报表的表名。我无法读取来源为宇宙的水晶报表的表格信息。

hear是示例代码:

代码语言:javascript
复制
  ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
            IEnterpriseSession enterpriseSession = sessionMgr.logon("xxxxxx", "xxxxx", "xxxxxxx", "secEnterprise"); 
            System.out.println("  BO SERVER  Session Created Sucessfully     ");
            reportAppFactory = (IReportAppFactory) enterpriseSession.getService("RASReportFactory");
            IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");
            IInfoObjects reports = iStore.query("select * from CI_INFOOBJECTS where SI_KIND='CrystalReport' and si_kind !='folder'");    
            for(int i=0;i<reports.size();i++)
              {
                    IInfoObject report = (IInfoObject)reports.get(i); 
                    IReportAppFactory reportAppFactory = (IReportAppFactory) enterpriseSession.getService("RASReportFactory");
                    try
                    {
                     ReportClientDocument rcd = reportAppFactory.openDocument(report,OpenReportOptions._openAsReadOnly,java.util.Locale.US);
                      System.out.println("Report Name:- "+rcd.displayName());                                           
                      DatabaseController databasecontroller=rcd.getDatabaseController();                                                                                          
                      IDatabase database=databasecontroller.getDatabase();                                                                          
                      Tables tables=database.getTables();         
                      for(int tab=0;tab<tables.size();tab++)
                       {
                         ITable table=tables.getTable(tab);
                         System.out.println("Alias Name:"+table.getAlias());                     
                         System.out.println("Tables used :- "+table.getName() );


                       }
EN

回答 1

Stack Overflow用户

发布于 2013-05-22 04:40:44

我不相信您可以通过Java SDK读取宇宙的表名。我所能找到的从宇宙中读取信息的最好方法是通过Office使用宏库。

我唯一拥有的示例代码是

代码语言:javascript
复制
'Grab the application
Set boDesignerApp = New Designer.Application
boDesignerApp.Visible = True

'Present login dialog
Call boDesignerApp.LogonDialog

'Present open dialog
Set boUniv = boDesignerApp.Universes.Open

'Hide designer
boDesignerApp.Visible = False

'iterate through the table names
For Each tbl In boUniv.Tables
    MsgBox (tbl.Name & " is table")
Next tbl
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16646916

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档