Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple SDK question for server group assignment

Status
Not open for further replies.

crystal01

Technical User
May 29, 2007
4
0
0
US
I have a snippet of code below in which I am trying to apply the setProcessingServerGroup() and setProcessingServerGroupChoice() methods to my report object. My question should be relatively simple: I believe I need to cast(?) my iObject report object to iProcessingServerGroupInfo per the API in order to use the methods, but I'm not sure how to do so.

Can someone please advise? Thanks in advance...

Code:

...
...
...
IInfoObject iObject = (IInfoObject) childReports.get(i);

int sgID_view = Integer.parseInt(serverGroupID_view);
int sgPref_view = Integer.parseInt(serverGroupPref_view);

!!!!! CONVERSION / CAST NEEDED HERE !!!!!

iProcessingServerGroupInfo.setProcessingServerGroup(sgID_view);
iProcessingServerGroupInfo.setProcessingServerGroupChoice(sgPref_view);
...
...
...

 
Where are you getting the iProcessingServerGroupInfo from? I'm assuming this is Java code, and I'm not really familiar with Java - I have, however, done extensive work in the .NET SDK. In .NET you have to set the server group info on the report object and its SchedulingInfo (you set it twice - once for scheduling, once for viewing...):
Code:
       rpt.SchedulingInfo.ServerGroup = groupID;
        rpt.SchedulingInfo.ServerGroupChoice = CeGroupChoice.ceGroupSpecified;
        rpt.ViewingServerGroup = groupID;
        rpt.ViewingServerGroupChoice = CeGroupChoice.ceGroupSpecified;
I hope this helps point you in the right direction....

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Yes, this is Java. iProcessingServerGroupInfo is the interface through which the setProcessingServerGroup() and setProcessingServerGroupChoice() methods are available. I am by no means an expert in Java and am fighting with how to cast(?) my iObject into iProcessingServerGroupInfo so I can use these methods.

I have the setSchedulingServerGroup() working, and there are setViewingServerGroup() and setCachingServerGroup() methods that I'll need to call as well. Once I figure out this cast once I should be good to go...

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top