Class BaseReport
Base class for Report, defines basic functionallity
Assembly: Reportman.Reporting.dll
Syntax
public abstract class BaseReport : ReportItem, IDisposable
Constructors
BaseReport()
Declaration
Fields
AbortingThread
Tells the engine if the background thread must be abort
Declaration
protected bool AbortingThread
Field Value
AsyncExecution
Set this property to true if you want to enable asynchronous execution,
that is the first page will be calculated and the other pages will be
calculated in a background thread
Declaration
public bool AsyncExecution
Field Value
AsyncPriority
Priority for the background execution thread, usually lower than the main thread
Declaration
public ThreadPriority AsyncPriority
Field Value
ChartingDriver
Declaration
public PrintOut ChartingDriver
Field Value
Components
List of all components related to the report
Declaration
[JsonIgnore]
[JsonIgnore]
public ReportItems Components
Field Value
CurrentOrientation
Declaration
public OrientationType CurrentOrientation
Field Value
CurrentSectionIndex
Current section index being processed
Declaration
protected int CurrentSectionIndex
Field Value
CurrentSubReportIndex
Current subreport index being processed
Declaration
public int CurrentSubReportIndex
Field Value
EmbeddedFiles
Declaration
public List<EmbeddedFile> EmbeddedFiles
Field Value
ErrorProcessing
Used to check a runtime error in report processing
Declaration
protected bool ErrorProcessing
Field Value
EvalIdens
A list of expression evaluator identifiers, added to handle special report
items like current page, current language...
Declaration
protected EvalIdentifiers EvalIdens
Field Value
Evaluator
Declaration
[JsonIgnore]
[JsonIgnore]
public Evaluator Evaluator
Field Value
ExecuteSubReportIndexes
List of subreports to execute, if not assigned or empty all subreports
will be executed
Declaration
[JsonIgnore]
[JsonIgnore]
public List<int> ExecuteSubReportIndexes
Field Value
FCompose
Determine if the report is composed of multiple reports
Declaration
Field Value
FDataAlias
A Dataset set can be passed to the engine to replace the datasets
definitions in the report scheme
Declaration
protected DatasetAlias FDataAlias
Field Value
FDriver
Declaration
protected PrintOut FDriver
Field Value
FExecuting
True if the report is still executing in the bacground thread
Declaration
protected bool FExecuting
Field Value
Declaration
protected Sections FGroupHeaders
Field Value
FRecordCount
Number of records processed by the main dataset in the current subreport
Declaration
protected int FRecordCount
Field Value
FreeSpace
Current free space in the current page (at the bottom)
Declaration
Field Value
List of page footers to be printed in the bottom of the page
Declaration
protected Sections GFooters
Field Value
List of page headers, to be repeated on each page (groups and page headers)
Declaration
protected Sections GHeaders
Field Value
InitialPageDetail
Declaration
public PageSizeDetail InitialPageDetail
Field Value
InternalPageHeight
Effective page height for current page
Declaration
public int InternalPageHeight
Field Value
InternalPageWidth
Effective page width for current page
Declaration
public int InternalPageWidth
Field Value
LastErrorProcessing
Error message when a error in report processing occur
Declaration
protected string LastErrorProcessing
Field Value
LastPage
This variable is true if the report have ended and the current page is the last
page
Declaration
Field Value
MAX_PAGENUM
Maximum number of pages a report can handle
Declaration
public const int MAX_PAGENUM = 100000
Field Value
Modified
Report has been modified (designer)
Declaration
[JsonIgnore]
[JsonIgnore]
public bool Modified
Field Value
PDFCompressed
Declaration
public bool PDFCompressed
Field Value
Declaration
public PDFConformanceType PDFConformance
Field Value
PageNum
Current page number (zero based index)
Declaration
Field Value
PageNumGroup
Current page number for current group (zero based index)
Declaration
Field Value
PendingSections
Sections still not drawn, but mandatory to draw before continuing report
processing
Declaration
protected Sections PendingSections
Field Value
PrintedSomething
True if the engine have printed some item
Declaration
public bool PrintedSomething
Field Value
UndoCue
Declaration
Field Value
UpdatePageSize
Declaration
public bool UpdatePageSize
Field Value
UsedDataReaders
Declaration
public SortedList<string, string> UsedDataReaders
Field Value
asection
Declaration
protected Section asection
Field Value
True if there are page footers to print
Declaration
protected bool havepagefooters
Field Value
mmfirst
Variable storing the first time the report progress was updated
Declaration
protected DateTime mmfirst
Field Value
mmlast
Variable storing the last time the report progress was updated
Declaration
protected DateTime mmlast
Field Value
oldprintedsection
Declaration
protected Section oldprintedsection
Field Value
oldprintedsectionext
Latest section index already measured
Declaration
protected Point oldprintedsectionext
Field Value
oldsubreport
Declaration
protected SubReport oldsubreport
Field Value
Position to print page footers
Declaration
protected int pagefooterpos
Field Value
Page footers to print at the end of the page
Declaration
protected Sections pagefooters
Field Value
pageposx
Current horizontal position in the current page
Declaration
Field Value
pageposy
Current vertical position in the current page
Declaration
Field Value
pagespacex
Maximum horizontal space in the current page
Declaration
Field Value
printing
True if the report is printing
Declaration
Field Value
section
Current section being processed
Declaration
protected Section section
Field Value
sectionext
Declaration
protected Point sectionext
Field Value
sectionextevaluated
True if the section extension have already evaluated
Declaration
protected bool sectionextevaluated
Field Value
subreport
Current subreport being processed
Declaration
protected SubReport subreport
Field Value
Properties
ActionAfter
Declaration
public bool ActionAfter { get; set; }
Property Value
ActionBefore
Declaration
public bool ActionBefore { get; set; }
Property Value
Alignment
Declaration
public TextAlignType Alignment { get; set; }
Property Value
AutoScale
Default scale when the preview is executed
Declaration
public AutoScaleType AutoScale { get; set; }
Property Value
BackColor
Declaration
public int BackColor { get; set; }
Property Value
BottomMargin
Declaration
public int BottomMargin { get; set; }
Property Value
CollateCopies
Collate copies by default
Declaration
public bool CollateCopies { get; set; }
Property Value
Compose
Declaration
[JsonIgnore]
[JsonIgnore]
public bool Compose { get; set; }
Property Value
Copies
Number of copies to print by default
Declaration
public int Copies { get; set; }
Property Value
CustomPageHeight
Page height in twips, if the page size is custom defined
Declaration
public int CustomPageHeight { get; set; }
Property Value
CustomPageWidth
Page width in twips, if the page size is custom defined
Declaration
public int CustomPageWidth { get; set; }
Property Value
CutText
Declaration
public bool CutText { get; set; }
Property Value
DataInfo
Report datasets collection
Declaration
public DataInfos DataInfo { get; set; }
Property Value
DatabaseInfo
Report databases collections (available connections)
Declaration
public DatabaseInfos DatabaseInfo { get; set; }
Property Value
DocAuthor
Declaration
public string DocAuthor { get; set; }
Property Value
DocCreationDate
Declaration
public string DocCreationDate { get; set; }
Property Value
DocCreator
Declaration
public string DocCreator { get; set; }
Property Value
DocKeywords
Declaration
public string DocKeywords { get; set; }
Property Value
DocModificationDate
Declaration
public string DocModificationDate { get; set; }
Property Value
DocProducer
Declaration
public string DocProducer { get; set; }
Property Value
DocSubject
Declaration
public string DocSubject { get; set; }
Property Value
DocTitle
Declaration
public string DocTitle { get; set; }
Property Value
DocXMPContent
Declaration
public string DocXMPContent { get; set; }
Property Value
Driver
The print driver used by the engine to calculate or print the report
Declaration
[JsonIgnore]
[JsonIgnore]
public PrintOut Driver { get; }
Property Value
Duplex
Declaration
public int Duplex { get; set; }
Property Value
FontColor
Declaration
public int FontColor { get; set; }
Property Value
FontRotation
Declaration
public short FontRotation { get; set; }
Property Value
FontSize
Declaration
public short FontSize { get; set; }
Property Value
FontStyle
Declaration
public int FontStyle { get; set; }
Property Value
ForcePaperName
Declaration
public string ForcePaperName { get; set; }
Property Value
GridColor
Define the grid color while designing the report
Declaration
public int GridColor { get; set; }
Property Value
GridEnabled
Define if the grid is enabled while designing the report, that is, by default
report components will be placed at the nearest grid position
Declaration
public bool GridEnabled { get; set; }
Property Value
GridHeight
Grid height interval in twips
Declaration
public int GridHeight { get; set; }
Property Value
GridLines
Define if the grid should be painted as horizontal and vertical lines instead of
points
Declaration
public bool GridLines { get; set; }
Property Value
GridVisible
Define if the grid should be visible while designing the report
Declaration
public bool GridVisible { get; set; }
Property Value
GridWidth
Grid width interval in twips
Declaration
public int GridWidth { get; set; }
Property Value
LFontName
Linux font name, that is the default font name while designing the report scheme
Declaration
public string LFontName { get; set; }
Property Value
Language
Declaration
public int Language { get; set; }
Property Value
LeftMargin
Declaration
public int LeftMargin { get; set; }
Property Value
LinesPerInch
Declaration
public short LinesPerInch { get; set; }
Property Value
Report Metafile storing drawing information for the report,
that is pages and objects inside pages
Declaration
[JsonIgnore]
[JsonIgnore]
public MetaFile MetaFile { get; set; }
Property Value
MultiPage
Declaration
public bool MultiPage { get; set; }
Property Value
PageBackColor
Background color for the pages in preview
Declaration
public int PageBackColor { get; set; }
Property Value
PageHeight
Declaration
public int PageHeight { get; set; }
Property Value
PageOrientation
Page orientation for the report
Declaration
public OrientationType PageOrientation { get; set; }
Property Value
PageSize
Declaration
public PageSizeType PageSize { get; set; }
Property Value
PageSizeIndex
Page size index if applicable, when it matchs the Windows GDI page size indexes
Declaration
public int PageSizeIndex { get; set; }
Property Value
PageWidth
Declaration
public int PageWidth { get; set; }
Property Value
PaperSource
Declaration
public int PaperSource { get; set; }
Property Value
Params
Report parameters collection
Declaration
public Params Params { get; set; }
Property Value
PreviewAbout
Declaration
public bool PreviewAbout { get; set; }
Property Value
PreviewMargins
Declaration
public bool PreviewMargins { get; set; }
Property Value
PreviewWindow
Default window size when the preview is executed
Declaration
public PreviewWindowStyleType PreviewWindow { get; set; }
Property Value
PrintOnlyIfDataAvailable
Declaration
public bool PrintOnlyIfDataAvailable { get; set; }
Property Value
PrintStep
Declaration
public PrintStepType PrintStep { get; set; }
Property Value
PrinterFonts
Declaration
public PrinterFontsType PrinterFonts { get; set; }
Property Value
PrinterSelect
Declaration
public PrinterSelectType PrinterSelect { get; set; }
Property Value
RecordCount
Number of records processed by the main dataset in the current subreport
Declaration
[JsonIgnore]
[JsonIgnore]
public int RecordCount { get; }
Property Value
RightMargin
Declaration
public int RightMargin { get; set; }
Property Value
SingleLine
Declaration
public bool SingleLine { get; set; }
Property Value
Declaration
public StreamFormatType StreamFormat { get; set; }
Property Value
SubReports
Declaration
public SubReports SubReports { get; set; }
Property Value
TopMargin
Declaration
public int TopMargin { get; set; }
Property Value
Transparent
Declaration
public bool Transparent { get; set; }
Property Value
TwoPass
Two pass report option, when two pass is enabled the first page of the report
is not shown (or print) until the full report is calculated, this option allow
the use of PAGECOUNT special expression and other advanced features like skip to
page and position properties in sections.
Declaration
public bool TwoPass { get; set; }
Property Value
Type1Font
Declaration
public PDFFontType Type1Font { get; set; }
Property Value
VAlignment
Declaration
public TextAlignVerticalType VAlignment { get; set; }
Property Value
WFontName
Windows font name, that is the default font name while designing the report scheme
Declaration
public string WFontName { get; set; }
Property Value
WordWrap
Declaration
public bool WordWrap { get; set; }
Property Value
Methods
ActivateDatasets()
Declaration
protected void ActivateDatasets()
AddComponent(ReportItem)
Declaration
public void AddComponent(ReportItem it)
Parameters
AddReportItemsToEvaluator(Evaluator)
Declaration
public void AddReportItemsToEvaluator(Evaluator eval)
Parameters
AddSubReport()
Declaration
public SubReport AddSubReport()
Returns
AddTotalPagesItem(int, int, string)
Declaration
public void AddTotalPagesItem(int apageindex, int aobjectindex, string adisplayformat)
Parameters
| Type |
Name |
Description |
| int |
apageindex |
|
| int |
aobjectindex |
|
| string |
adisplayformat |
|
AlignSectionsTo(int)
Declaration
public void AlignSectionsTo(int linesPerInch)
Parameters
| Type |
Name |
Description |
| int |
linesPerInch |
|
BeginPrint(PrintOut)
Declaration
public virtual void BeginPrint(PrintOut driver)
Parameters
CheckIfDataAvailable()
Declaration
protected void CheckIfDataAvailable()
CheckParameters()
Declaration
public string CheckParameters()
Returns
CheckProgress(bool)
Internal progress procedure
Declaration
protected void CheckProgress(bool finished)
Parameters
| Type |
Name |
Description |
| bool |
finished |
When finished calls an event if assigned
|
ConvertToDotNet()
Converts a report to dot net, changing data driver type and parameters in sql sentences
Declaration
public void ConvertToDotNet()
CreateNew()
Declaration
DeActivateDatasets()
Declaration
protected void DeActivateDatasets()
DeleteComponent(ReportItem)
Declaration
public void DeleteComponent(ReportItem item)
Parameters
DeleteComponentPrintPosItem(Section, PrintPosItem, int, int)
Declaration
public void DeleteComponentPrintPosItem(Section section, PrintPosItem compo, int index, int groupId)
Parameters
DeleteComponents(Section, int)
Declaration
public void DeleteComponents(Section section, int groupId)
Parameters
DeleteItem(ReportItem, int)
Declaration
public void DeleteItem(ReportItem item, int groupId)
Parameters
DeleteSubReport(SubReport)
Declaration
public void DeleteSubReport(SubReport sub)
Parameters
Dispose()
Declaration
DoUpdatePageSize(MetaPage, PageSizeDetail)
Declaration
public void DoUpdatePageSize(MetaPage MetaFilepage, PageSizeDetail detail)
Parameters
EndPrint()
Declaration
Declaration
protected void FillGlobalHeaders()
FindNewName(ReportItem)
Find new name for a report item
Declaration
public string FindNewName(ReportItem ritem)
Parameters
Returns
GenerateNewName(ReportItem)
Create a new name for a report item
Declaration
public void GenerateNewName(ReportItem ritem)
Parameters
GetParentSection(PrintPosItem)
Declaration
public Section GetParentSection(PrintPosItem item)
Parameters
Returns
GetParentSubReport(Section)
Declaration
public SubReport GetParentSubReport(Section section)
Parameters
| Type |
Name |
Description |
| Section |
section |
|
Returns
GetReportVariables()
Obtain a list of available identifiers that can be used in a expression
inside Evaluator class
Declaration
public Strings GetReportVariables()
Returns
InitEvaluator()
Declaration
public void InitEvaluator()
InitializeParams()
Declaration
public void InitializeParams()
LoadFromCommand(IDbCommand)
Declaration
public void LoadFromCommand(IDbCommand selecommand)
Parameters
LoadFromDataReader(IDataReader)
Declaration
public void LoadFromDataReader(IDataReader areader)
Parameters
LoadFromFile(string)
Declaration
public void LoadFromFile(string filename)
Parameters
| Type |
Name |
Description |
| string |
filename |
|
LoadFromStream(Stream)
Declaration
public void LoadFromStream(Stream astream)
Parameters
| Type |
Name |
Description |
| Stream |
astream |
|
LoadFromStream(Stream, int)
Declaration
public void LoadFromStream(Stream astream, int bufsize)
Parameters
| Type |
Name |
Description |
| Stream |
astream |
|
| int |
bufsize |
|
NewComponentByClassName(string)
Declaration
public static ReportItem NewComponentByClassName(string className)
Parameters
| Type |
Name |
Description |
| string |
className |
|
Returns
PrepareParamsAfterOpen()
Declaration
protected void PrepareParamsAfterOpen()
PrepareParamsBeforeOpen()
Declaration
protected void PrepareParamsBeforeOpen()
PrintAll(PrintOut)
Declaration
public void PrintAll(PrintOut Driver)
Parameters
PrintNextPage()
Declaration
public abstract bool PrintNextPage()
Returns
RemoveComponent(ReportItem)
Declaration
public void RemoveComponent(ReportItem it)
Parameters
RequestPage(int)
Declaration
public bool RequestPage(int pageindex)
Parameters
| Type |
Name |
Description |
| int |
pageindex |
|
Returns
SaveToFile(string, StreamVersion)
Declaration
public void SaveToFile(string filename, StreamVersion version = StreamVersion.V2)
Parameters
SaveToStream(Stream, StreamVersion)
Declaration
public void SaveToStream(Stream astream, StreamVersion version = StreamVersion.V2)
Parameters
SubreportMustBeExecuted(SubReport)
Declaration
public bool SubreportMustBeExecuted(SubReport nsubreport)
Parameters
Returns
UpdateParamsAfterOpen(int, bool)
Declaration
protected void UpdateParamsAfterOpen(int index, bool doeval)
Parameters
| Type |
Name |
Description |
| int |
index |
|
| bool |
doeval |
|
UpdateParamsBeforeOpen(int, bool)
Declaration
public void UpdateParamsBeforeOpen(int index, bool doeval)
Parameters
| Type |
Name |
Description |
| int |
index |
|
| bool |
doeval |
|
UpdateReferences()
Declaration
public void UpdateReferences()
Events
OnProgress
Event to track the report progress and cancel the progress if needed
Declaration
public event ReportProgress OnProgress
Event Type
OnWorkAsyncError
Event to track report errors
Declaration
public event MetaFileWorkAsyncError OnWorkAsyncError
Event Type
OnWorkProgress
Event to track report progress
Declaration
public event MetaFileWorkProgress OnWorkProgress
Event Type
Implements