on 04-30-2008 9:14 AM
Post Author: joiherm
CA Forum: .NET
Hi all,
I am trying to get repository information out from the Business Objects for example the last run time of the repport (SI_LAST_RUN_TIME). I'm coding in .NET C#. The reports are most of them WebI reports.
I've got some properties but I need to get more...
Here is a code example of what I've done so far:
-
//Here are the imports:
using CrystalDecisions.Enterprise;
using CrystalDecisions.Enterprise.Desktop;
using CrystalDecisions.Enterprise.Viewing;
using CrystalDecisions.ReportAppServer.Controllers;
using CrystalDecisions.Enterprise.WebControls;
using BusinessObjects.Enterprise.Desktop;
//Then the code
SessionMgr sessionMgr = new SessionMgr();
EnterpriseSession enterpiseSession = sessionMgr.Logon("Administrator", "", serverName, "secEnterprise");
EnterpriseService enterpiseService = enterpiseSession.GetService("InfoStore");
InfoStore infoStore = new InfoStore(enterpiseService);
string queryString = "SELECT * FROM CI_INFOOBJECTS where SI_NAME='reportName'";
InfoObjects infoObjects = infoStore.Query(queryString);
for (int i = 1; i <= infoObjects.Count; i++)
{
InfoObject infoReport = infoObjects[i];
Webi WebI = (Webi)infoReport;
//I am not able to cast the infoReport to an Report because it is a WebI report
//Report report = (Report)infoReport;
listBox1.Items.Add(infoReport.ID);
listBox1.Items.Add(infoReport.Title);
listBox1.Items.Add(WebI.Instance);
listBox1.Items.Add("----
");
}
I've found some examples on the internet but that I've found I have not been able to use in my .NET C# application because it is a java code.//get the object
IInfoObject obj=(IInfoObject)objs.get(0);
//get the SI_INSTANCE property
int SI_INSTANCE =obj.properties().getProperty(CePropertyID.SI_INSTANCE). getValue();Is there anybody that can help me with this problem?Johann
Post Author: Argan
CA Forum: .NET
Try something like:
infoReport.Properties["SI_LAST_RUN_TIME"].ToString()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.