cancel
Showing results for 
Search instead for 
Did you mean: 

C# Query to find Output Destination.

Former Member
0 Kudos

Post Author: fiddelm3742

CA Forum: .NET

I'm modifying one of the Business Objects XI .Net samples (Rpt View External Format Instance) and trying to retrieve some info from the CMS. The part I'm having issues with is retrieving the Location that reports are being output to. I can successfully retrieve most of the properties I need from my InfoObjects, however I can't seem to successfully pull the output path from SchedulingInfo. I can retrieve if it's unmanaged disk, FTP, SMTP etc however the information I want is the actual Path used for the unmanged disk via DESTINATION but I can't seem to locate the actual SI_OUTPUT_FILES/location Is it possible to retrieve this information in this manner?

Response.Write("<td>" + ceReportObject.SchedulingInfo.Destination.Name.ToString() + " Sched </td>");

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Post Author: fiddelm3742

CA Forum: .NET

Well I've figured out how to do this myself. It involves traversing through all the different layers of the SchedulingInfo To figure out the layers I just did a Select * on my object from the query builder and worked my way through the structure. This may not be the cleanest way, but this is how "I" was able to pull back the Output Destination. You should be able to pull back just about any properties using this type operation. Hope this helps someone with a similar problem.

//Output Destination----


try

{

Response.Write("<td>");

Property propertySI_Destinations = ceReportObject.SchedulingInfo.Properties&#91;"SI_DESTINATIONS"&#93;;

Property propertySI_Total = propertySI_Destinations.Properties&#91;"SI_Total"&#93;;

int intSI_Total = Convert.ToInt32(propertySI_Total.Value);

if (intSI_Total == 0)

{

Response.Write("NULL");

}

while (intSI_Total > 0)

{

Property propertySI_DestinationX = propertySI_Destinations.Properties&#91;intSI_Total + 1&#93;;

Property propertySI_DestProgID = propertySI_DestinationX.Properties&#91;"SI_PROGID"&#93;;

Property propertySI_DestSchedOptions = propertySI_DestinationX.Properties&#91;"SI_DEST_SCHEDULEOPTIONS"&#93;;

Property propertySI_Output_Files = propertySI_DestSchedOptions.Properties&#91;"SI_OUTPUT_FILES"&#93;;

Property propertySI_Output_Total = propertySI_Output_Files.Properties&#91;"SI_TOTAL"&#93;;

int intSI_Output_Total = Convert.ToInt32(propertySI_Output_Total.Value);

if (intSI_Output_Total == 0)

{

Response.Write("NULL");

}

while (intSI_Output_Total > 0)

{

Property propertySI_Output_FilesX = propertySI_Output_Files.Properties&#91;intSI_Output_Total + 1&#93;;

string strReportOutput = propertySI_Output_FilesX.ToString();

strReportOutput = strReportOutput.Replace("%SI_NAME%", ceReportObject.Properties&#91;"SI_NAME"&#93;.ToString());

Response.Write(strReportOutput + " ");

intSI_Output_Total--;

}

intSI_Total--;

}

Response.Write("</td>");

}

catch

{

Response.Write("NULL </td>");

}

Answers (0)