是否可以通过BO NET SDK从BO文件中获取提示列表?
例如,我启动一个应用程序,然后加载一个rep文件,之后,应用程序告诉我,在这个rep文件中,有3个提示
第三个是:???类型是???
busobj.Application boApp = new busobj.Application();
boApp.Logon(GlobalClass.user.strUsrId, GlobalClass.user.strPWD, "@bopfast", "LDAP", false, false);
boApp.Interactive = false;
boApp.Visible = false;
busobj.Document testDoc = new busobj.Document();
testDoc = (busobj.Document)boApp.Documents.Open("C:\\test.rep", true, false, null, null);
答案 0 :(得分:0)
我知道可以用Java做到这一点:
/* Connect to CMS */
ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
enterpriseSession = sessionMgr.logon(user, pass, host, auth);
/* Initialize Webi report engine */
reportEngines = (ReportEngines) enterpriseSession.getService("ReportEngines");
ReportEngine reportEngine = (ReportEngine) reportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
/* Open report */
DocumentInstance doc = reportEngine.openDocument(rapport_id);
doc.refresh();
/* Get Prompts */
Prompts prompts = doc.getPrompts();
System.out.println("Total Prompts : " + prompts.getCount())
Prompts prompts = doc.getPrompts();
for (int s = 0; s < prompts.getCount(); s++) {
Prompt prompt = prompts.getItem(s);
System.out.println("Prompt name : " + prompt.getID());
}
您可以在此处找到.NET SDK的一些示例:http://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+.NET+SDK+Samples
此处您有商业智能软件开发人员套件的示例应用程序: http://scn.sap.com/docs/DOC-51445
希望它有所帮助。