Instructions & Documentation For information on using the FreeReports ActiveX control in your development environment, please see your documentation. The ActiveX interface offers a number of functions to use FreeReports. These are listed below, with instructions on their use. -------------------------------------------------------------------------------- void AddField(LPCTSTR pszFieldName, double dFieldWidth); pszFieldName - Field name to add to the report dFieldWidth - Field width of field in millimetres If dFieldWidth is specified as -1, FreeReports will automatically fit the field on the page -------------------------------------------------------------------------------- void AddRow(LPCTSTR pszTabDelRow); pszTabDelRow - A row of data to add to the report, delimited by tabs. Example: "Paul\tMaddox\tVisual C++" -------------------------------------------------------------------------------- void ClearDate(); Clears all data from the report, including rows and fields. -------------------------------------------------------------------------------- void GotoNextPage(); For a multi-page report, move to the next page. -------------------------------------------------------------------------------- void GotoPage(short nPage); nPage - Page number to jump to For a multi-page report, move to the page specified. -------------------------------------------------------------------------------- void GotoPrevPage(); For a multi-page report, move to the previous page. -------------------------------------------------------------------------------- void Print(); Show common print dialog and print report. -------------------------------------------------------------------------------- void SetBottomMarg(double dBottomMargin); dBottomMargin - The bottom margin for the report in millimetres -------------------------------------------------------------------------------- void SetColumnarCols(short nColumnarCols); nColumnarCols - Number of columns For a columnar report, specify the number of columns the data will the shown between. -------------------------------------------------------------------------------- void SetContinuous(BOOL bSetContinuous); bSetContinuous - True (grid-like output), False (one row per sheet) -------------------------------------------------------------------------------- void SetDrawFtDate(BOOL bDrawFooterDate); bDrawFooterDate - True (display date on footer), False (do not display date on footer) -------------------------------------------------------------------------------- void SetDrawHGrid(BOOL bDrawHorizGrid); bDrawHorizGrid - True (Show horizontal grid lines on grid layout) -------------------------------------------------------------------------------- void SetDrawVGrid(BOOL bDrawVertGrid); bDrawVertGrid- True (Show vertical grid lines on grid layout) -------------------------------------------------------------------------------- void SetLeftMarg(double dLeftMargin); dLeftMargin - The left margin for the report in millimetres -------------------------------------------------------------------------------- void SetPageA4Land(); Set report as A4 landscape sized. -------------------------------------------------------------------------------- void SetPageA4Port(); Set report as A4 portrait sized. -------------------------------------------------------------------------------- void SetPageLtrLand(); Set report as Letter landscape sized. -------------------------------------------------------------------------------- void SetPageLtrPort(); Set report as Letter landscape sized. -------------------------------------------------------------------------------- void SetRightMarg(double dRightMargin); dRightMargin - The right margin of the report in millimetres -------------------------------------------------------------------------------- void SetSubTitle(LPCTSTR pszSubTitle); pszSubTitle - Sub title that appears on the main report header -------------------------------------------------------------------------------- void SetTitle(LPCTSTR pszTitle); pszTitle - Main title that appears on the main report header -------------------------------------------------------------------------------- void SetTopMarg(double dTopMargin); dTopMargin - The top margin of the report in millimetres