FIDAL - Financial Data Access Library

  Home | Documentation | Download
 

 

NAME
   FD_Report - C Function


SYNOPSIS
   #include <stdio.h>
   #include "fidal.h"

   FD_RetCode FD_Report( const FD_UDBase *dbase,
                         FILE *out,
                         FD_ReportFlags flags );
           

DESCRIPTION

Allows to output information about the contents of an unified database. The generated report can be sent to stdout, stderr or to any files the user has previously opened.

PARAMETER

'flags'
Can be a combination of any of the following definition (can be or'ed using the '|' operator)

FD_REPORT_SYMBOLAll symbols in the unified database are going to be reported.
FD_REPORT_CATEGORYAll category in the unified database are going to be reported. If FD_REPORT_SYMBOL is also defined, the symbols are going to be visually placed under each corresponding category.
FD_REPORT_SOURCEIndicate the data source used by the unified database.
If FD_REPORT_SYMBOL and/or FD_REPORT_SYMBOL is also defined, the data source corresponding to each category/symbol is output. More than one data source can be output for the same category/symbol.
FD_REPORT_TOTALAdd the total number of distinct categories and symbols at the end of the output.


RETURN VALUE

FD_SUCCESSOperation is successful
FD_ALLOC_ERRCannot allocate memory, or memory corruption detected
FD_UNKNOWN_ERROperation failed for unknown reason

For other error code, or to match a number to an error description, check the FD_RetCode enumeration in "FIDAL/c/include/fd_common.h"

SEE ALSO

FD_Initialize , FD_AddDataSource


EXAMPLE
#include <stdio.h>
#include "fidal.h"

void outputReports( FD_UDBase *dbase )
{
   FILE *myFile;

   /* Print on stdout the number of category and symbols. */
   FD_Report( dbase, stdout, FD_REPORT_TOTAL );

   /* Print in a file the list of category and symbols */
   myFile = fopen( "output.txt", "w" );
   if( myFile != 0 )
   {
      FD_Report( dbase, myFile, FD_REPORT_SYMBOL|FD_REPORT_CATEGORY );
      fclose( myFile );
   }
}

Google  SourceForge Logo
  Web FidalSoft.org
 

Copyright? 2006 TicTacTec LLC. All Rights Reserved. Last Update: 07/21/06, Unique Visitor: