Skip to Content
author's profile photo Former Member
Former Member

Getting properties from infoobjects

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&#91;i&#93;;

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 02, 2008 at 09:59 PM

    Post Author: Argan

    CA Forum: .NET

    Try something like:

    infoReport.Properties&#91;"SI_LAST_RUN_TIME"&#93;.ToString()

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.