View Single Post
  #1 (permalink)  
Old 06-04-2007, 03:20 PM
madhombre madhombre is offline
Registered User
 
Join Date: Jul 2006
Posts: 0
reports from C# - no reports showing in ACD

trying this again, it is irritating me.

what I have so far..

cvsApplicationClass oApp = new cvsApplicationClass();
Object oCon = new Object();
Object oSrv = new Object();

if (((cvsApplicationClass)oApp).CreateServer("****", "", "", "******", false, "ENU", ref oSrv, ref oCon))
{
if (((cvsConnection)oCon).Login("*****", "******", "****", "ENU", "", false))
{
cvsServer SRV = (cvsServer)oSrv;
cvsConnection oConn = (cvsConnection)SRV.get_Connection();

Console.WriteLine("Conn status: " + oConn.ConnectionStatus.ToString());
Console.WriteLine("ACD's on this server: " + SRV.ACDs.Count());
cvsCatalog CAT = (cvsCatalog)SRV.Dictionary;

Console.WriteLine("Catalog Name: " + CAT.Name);
Console.WriteLine("Connected: " + SRV.Connected);
Console.WriteLine("Errors: " + SRV.Errors.Count());
Console.WriteLine("Server Instance: " + SRV.ServerInstance);

CAT.ACD = 1;
Console.WriteLine("Current ACD: " + CAT.ACD);
Console.WriteLine("Reports on this ACD: " + CAT.Reports.Count());

CAT.ACD = 2;
Console.WriteLine("Current ACD: " + CAT.ACD);
Console.WriteLine("Reports on this ACD: " + CAT.Reports.Count());

CAT.ACD = 3;
Console.WriteLine("Current ACD: " + CAT.ACD);
Console.WriteLine("Reports on this ACD: " + CAT.Reports.Count());

/*foreach (object o in CAT.Reports)
{
}*/
}


and here is the output I get

Conn status: csConnectionUp
ACD's on this server: 3
Catalog Name: Dictionary
Connected: False
Errors: 0
Server Instance: 32
Current ACD: 1
Reports on this ACD: 0
Current ACD: 2
Reports on this ACD: 0
Current ACD: 3
Reports on this ACD: 0

which makes no sense, firstly why is is the connection I get from the server object saying it is up but then the server connected is false?

Then I get the ACD's of 3 which is correct
but there are no reports on any of the ACD's? when I know there is (logged in via the program to check)

Any help here?
Reply With Quote