Accounting Software
Small Business Software Estimating Software
Construction Estimating SoftwareBookkeeping SoftwareInventory SoftwareInventory Control SoftwareInventory Tracking SoftwareInventory Management SoftwareBusiness Management Software

Report Viewers (Header)

Link to: source code | record viewer directory

Copyright Turtle Creek Software 1996-2006. All Rights Reserved.

This class manages report viewers for the Goldenseal accounting software,
small business management software, construction project management software and
construction estimating software.

class DB_ReportViewer : public DB_RecordViewer,
public CReportInfoOwner
{
public:

enum { class_ID = 'REPV' };
static DB_ReportViewer *NewFromStream(LStream *inStream)
{ return NEW DB_ReportViewer(inStream); };

DB_ReportViewer(const SPaneInfo &inPaneInfo, const SViewInfo &inViewInfo);
DB_ReportViewer(LStream *inStream);
virtual ~DB_ReportViewer();

virtual void ListenToMessage(MessageT inMessage, void *ioParam);
virtual Boolean ObeyCommand(CommandT inCommand, void *ioParam);

virtual DB_ClassDescriptor *GetCurrClassDesc() const { return nil; }

virtual SInt32 GetLayoutClassID() const { return id_ReportLayout; }

void DoPrint();

virtual void FindCommandStatus(CommandT inCommand, Boolean &outEnabled,
Boolean &outUsesMark, UInt16 &outMark,
Str255 outName);

void UpdateCalculatorPanes();
void ResetCalculatorPanes (const SInt32 source);

virtual LPane *CreateTablePane(const SPaneInfo &paneInfo,
const CTCS_TextInfo &textInfo,
CInputStream &stream,
const SMemberInfo &memberInfo,
Boolean isBreakdown = true,
const DB_ClassDescriptor *descriptor = nil);

virtual Boolean GetTableCount() { return mTableCount; }
/*virtual Boolean GetTableData(TagType &breakdownTag, DBid &reportClassID,
Boolean &includeZeroBreakdowns);*/
void WriteTextToOutputStream (CTextOutputStream &stream);

virtual void DoFinalFieldSetup();
virtual void DoTableSort();
TableIndexT DoSortDialog(Boolean &sortAscending);

void SetReportEditor(CReportEditor *editor) { mReportEditor = editor; }
protected :
TLayoutPaneInfoArray mLayoutPanes;
CReportEditor *mReportEditor;
SInt32 mTableCount;
UInt8 mReportViewerFiller:8;
CReportTable *mReportTable;
void CalibratePanePositions();
virtual void ReadFromLayoutHeader(const SLayoutHeader &header, const SInt32 format);

virtual LPane *CreateLayoutPane(CInputStream &stream, const SInt16 paneType,
const SPaneInfo &paneInfo, const SLayoutInfo &mdInfo,
Boolean &gaveWarning, DB_ClassDescriptor *desc = nil,
const Boolean isPasting = false);
virtual LPane *CreateCVField(const SMemberInfo &memberInfo, const SPaneInfo &paneInfo,
const SLayoutInfo &mdInfo, const CTCS_TextInfo &textInfo,
const FormatType format, const CTextString &helpText,
const Boolean editable = true);
virtual void DrawSelf();
};