Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: API error message "The fault string: Failed to run report"
Topic Summary:
Created On: 10-Aug-2006 11:17
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 10-Aug-2006 11:17
User is offline View Users Profile Print this message


Ronen Ben-Chamo

Posts: 84
Joined: 1-Dec-2005

Hi,
I would like to run a query on my CS system
I'm getting error message:
"
The fault code: 1000
The fault string: Failed to run report
"
the query is very simple, so I dont know what could be the problem

my $OpenCRResults = $csapi->QueryData($aUser, "Basic Summary", "(submitter='ccm_root') and (cvtype='problem')", undef, undef, undef);

I Succeeded to login tothe system by CLI

Please find the script below



-----------------------------------------------------------------------------------


#Include the ChangeSynergy csapi module.
   use ChangeSynergy::csapi;
   
# define variables
   
   
   $User = xxx
   $password = 123


   #Create a new instance of the csapi object.
   my $csapi = new ChangeSynergy::csapi();

   print "===========================================================================n";
   print "======= Read CR from DB comccw...n";
   print "===========================================================================n";

   #Eval block is used for error handling.
   eval
   {
      ###################################
      #Read CR data from external system
      ###################################
      #Setup the connection parameters for connecting to the ChangeSynergy Server.
      #Note however that no connection to the server is made at this point.
      print "======= Set up connection to http://cm2il01cm:8600/cs...n";
      $csapi->setUpConnection("http", "cm2il01cm", 8600 );
      print "======= Login as $User...n";   
      my $aUser = $csapi->Login($User, $Password, "User", "\\cm2il01cm\ccmdb\comccw");
      
      #Run the QueryData method to recieve a data report.  
      #Pass in the user object, report name, query string, query name, report title, template name and attribute list.
      
      print "======= Run Query ...n";
      
      print "The user is $aUsern";
      print "The query $queryCRn";
   
      my $OpenCRResults = $csapi->QueryData($aUser, "Basic Summary", "(submitter='ccm_root') and (cvtype='problem')", undef, undef, undef);


      $NumOpenCR=$OpenCRResults->getDataSize();


      print "nTotal number of Open CR's at last week = " . $OpenCRResults->getDataSize() . "nn";
      
      #Loop over each returned result, in this case each problem
      for(my $i = 0; $i < $OpenCRResults->getDataSize(); $i++)
      {
         #Get the data for the current problem
         my $reportData = $OpenCRResults->getDataObject($i);
      
         #Loop over each returned attribute
         for(my $j = 0; $j < $reportData->getDataSize(); $j++)
         {
            #Get the data for the current attribute
            my $attributeData = $reportData->getDataObject($j);
      
            #Print the attribute name and its value
            print $attributeData->getName() . ": " . $attributeData->getValue() . "n";

         }
      
         #Print a blank line between each problem
         print "n";
      }
      
        
      
   };

      

      

   print "nnn";
   # print "=================end of file===============n";

   #If any errors occured, print them to the screen.
   if ($@)
   {
      print $@;
   }
---------------------------------------------------------------------------------


-------------------------
Ronen Ben-Chamo
Configuration Managment
Report this to a Moderator Report this to a Moderator
 16-Aug-2006 23:36
User is offline View Users Profile Print this message


Steve Borchers

Posts: 10
Joined: 26-Apr-2004

I think you're missing a parameter on your QueryData line: the attribute list.

# QueryData(user object, report name, query string, query name, report title, template name, attribute list)
my $attribute_list = "problem_number|crstatus|problem_synopsis|problem_description";
my $OpenCRResults = $csapi->QueryData($aUser, "Basic Summary", "(submitter='ccm_root') and (cvtype='problem')", undef, undef, undef,$attribute_list);

(In my queries, I've used an empty string for the report title, but undef probably works too.)
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.