C# Class PdfRpt.FluentInterface.ColumnItemsTemplateBuilder

Column Items Template Builder Class.
Mostra file Open project: VahidN/PdfReport Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Annotation ( Func onPrintAnnotation ) : void

Displaying current cell's data as an annotation.

Barcode ( Barcode value ) : void

Displaying current cell's data as a Barcode.

BasicProperties ( CellBasicProperties data ) : void

Table's Cells Definitions. If you don't set this value, it will be filled by using current template's settings internally.

ByteArrayImage ( string defaultImageFilePath, bool fitImages, bool cacheImages = true ) : void

Displaying current cell's data as an Image.

Checkmark ( System checkmarkFillColor = null, System crossSignFillColor = null ) : void

This item template is useful for displaying Boolean data (true/false) as checkMarks

ConditionalFormatFormula ( Func formula ) : void

Defines the current cell's properties, based on the other cells values. Here IList contains actual row's cells values. It can be null.

CustomTemplate ( IColumnItemsTemplate columnItemsTemplate ) : void

Custom template of the in use property, controls how and what should be rendered in each cell of this column. It can be null. If you don't set it, new DisplayAsText() template will be used automatically.

DisplayFormatFormula ( string>.Func formula ) : void

Fires before each cell of this column is being rendered as a string. Now you have time to manipulate the received object and apply your custom formatting function. It can be null.

Hyperlink ( System foreColor, bool fontUnderline, string textPropertyName = "", string navigationUrlPropertyName = "" ) : void

Displaying current cell's data as a hyperlink

ImageFilePath ( string defaultImageFilePath, bool fitImages, bool cacheImages = true ) : void

Displaying current cell's data as an Image. It's assumed that this data point to the physical image's path on the disk.

InlineField ( Action inlineFieldBuilder ) : void

Defines how to display the current cell's data.

MonthCalendar ( CalendarAttributes data ) : void

Displaying current cell's data as a MonthCalendar. Calendar's cell data type should be CalendarData. Use DaysInfoToCalendarData.MapToCalendarDataList to map list of the DayInfo's to the list of CalendarData's.

PdfTemplate ( string pdfTemplatePath, Action onFillAcroForm ) : void

Using an AcroForm or a simple pdf template file as the Cells template.

ProgressBar ( Func progressBarColorFormula, bool showPercentText ) : void

Displaying current cell's data as text plus a ProgressBar.

ProgressBar ( System progressBarColor, bool showPercentText ) : void

Displaying current cell's data as text plus a ProgressBar.

Symbol ( Func onSelectSymbol ) : void

Displaying the current cell's data as a Zapf Dingbats symbol.

TextBlock ( ) : void

Displaying current cell's data as text.

WingdingsSymbol ( Func onSelectSymbol ) : void

Displaying the current cell's data as a Wingdings symbol.

XHtml ( IList cssFilesPath = null, string inlineCss = "", string imagesRootPath = "" ) : void

Using iTextSharp's HTML to PDF capabilities. This method uses the XmlWorker class of iTextSharp.

Method Details

Annotation() public method

Displaying current cell's data as an annotation.
public Annotation ( Func onPrintAnnotation ) : void
onPrintAnnotation Func Return an AnnotationFieldData based on the passed value, which is the actual row's fields values from TableDataSource and CalculatedFieldFormula. If you don't want to add the annotation, return null.
return void

Barcode() public method

Displaying current cell's data as a Barcode.
public Barcode ( Barcode value ) : void
value iTextSharp.text.pdf.Barcode An instance of iTextSharp.text.pdf.BarcodeXYZ
return void

BasicProperties() public method

Table's Cells Definitions. If you don't set this value, it will be filled by using current template's settings internally.
public BasicProperties ( CellBasicProperties data ) : void
data PdfRpt.Core.Contracts.CellBasicProperties
return void

ByteArrayImage() public method

Displaying current cell's data as an Image.
public ByteArrayImage ( string defaultImageFilePath, bool fitImages, bool cacheImages = true ) : void
defaultImageFilePath string Default image will be used in case of null images
fitImages bool Set fitImages to true to fit the image to the cell
cacheImages bool If true, the image bytes will be added to the PDF only once, not per each new instance. Therefore the result won't be a bloated PDF file. Choose this option if there are many similar images in your data source.
return void

Checkmark() public method

This item template is useful for displaying Boolean data (true/false) as checkMarks
public Checkmark ( System checkmarkFillColor = null, System crossSignFillColor = null ) : void
checkmarkFillColor System Checkmark's fill color.
crossSignFillColor System Fill color of the cross sign.
return void

ConditionalFormatFormula() public method

Defines the current cell's properties, based on the other cells values. Here IList contains actual row's cells values. It can be null.
public ConditionalFormatFormula ( Func formula ) : void
formula Func
return void

CustomTemplate() public method

Custom template of the in use property, controls how and what should be rendered in each cell of this column. It can be null. If you don't set it, new DisplayAsText() template will be used automatically.
public CustomTemplate ( IColumnItemsTemplate columnItemsTemplate ) : void
columnItemsTemplate IColumnItemsTemplate
return void

DisplayFormatFormula() public method

Fires before each cell of this column is being rendered as a string. Now you have time to manipulate the received object and apply your custom formatting function. It can be null.
public DisplayFormatFormula ( string>.Func formula ) : void
formula string>.Func
return void

Hyperlink() public method

Displaying current cell's data as a hyperlink
public Hyperlink ( System foreColor, bool fontUnderline, string textPropertyName = "", string navigationUrlPropertyName = "" ) : void
foreColor System
fontUnderline bool
textPropertyName string If you don't set TextPropertyName, current cell's text will be used as hyperlink's text.
navigationUrlPropertyName string If you don't set NavigationUrlPropertyName, current cell's text will be used as hyperlink's target url.
return void

ImageFilePath() public method

Displaying current cell's data as an Image. It's assumed that this data point to the physical image's path on the disk.
public ImageFilePath ( string defaultImageFilePath, bool fitImages, bool cacheImages = true ) : void
defaultImageFilePath string Default image will be used in case of missing images
fitImages bool Set fitImages to true to fit the image to the cell
cacheImages bool If true, the image bytes will be added to the PDF only once, not per each new instance. Therefore the result won't be a bloated PDF file. Choose this option if there are many similar images in your data source.
return void

InlineField() public method

Defines how to display the current cell's data.
public InlineField ( Action inlineFieldBuilder ) : void
inlineFieldBuilder Action Defines how to display the current cell's data.
return void

MonthCalendar() public method

Displaying current cell's data as a MonthCalendar. Calendar's cell data type should be CalendarData. Use DaysInfoToCalendarData.MapToCalendarDataList to map list of the DayInfo's to the list of CalendarData's.
public MonthCalendar ( CalendarAttributes data ) : void
data CalendarAttributes MonthCalendarField's data.
return void

PdfTemplate() public method

Using an AcroForm or a simple pdf template file as the Cells template.
public PdfTemplate ( string pdfTemplatePath, Action onFillAcroForm ) : void
pdfTemplatePath string An AcroForm or a simple pdf template file's path. Only first page of the passed AcroForm makes sense here as a cell's template!
onFillAcroForm Action Gives you the Row's data and AcroForm to set form.SetField method. It can be null.
return void

ProgressBar() public method

Displaying current cell's data as text plus a ProgressBar.
public ProgressBar ( Func progressBarColorFormula, bool showPercentText ) : void
progressBarColorFormula Func Progress bar's background color based on the current row's values.
showPercentText bool Indicates whether the percentage text should be displayed or not.
return void

ProgressBar() public method

Displaying current cell's data as text plus a ProgressBar.
public ProgressBar ( System progressBarColor, bool showPercentText ) : void
progressBarColor System Progress bar's background color
showPercentText bool Indicates whether the percentage text should be displayed or not
return void

Symbol() public method

Displaying the current cell's data as a Zapf Dingbats symbol.
public Symbol ( Func onSelectSymbol ) : void
onSelectSymbol Func Choose a Zapf Dingbats symbol based on the passed value.
return void

TextBlock() public method

Displaying current cell's data as text.
public TextBlock ( ) : void
return void

WingdingsSymbol() public method

Displaying the current cell's data as a Wingdings symbol.
public WingdingsSymbol ( Func onSelectSymbol ) : void
onSelectSymbol Func Choose a Wingdings symbol based on the passed value.
return void

XHtml() public method

Using iTextSharp's HTML to PDF capabilities. This method uses the XmlWorker class of iTextSharp.
public XHtml ( IList cssFilesPath = null, string inlineCss = "", string imagesRootPath = "" ) : void
cssFilesPath IList Optional external CSS files.
inlineCss string Optional inline CSS content.
imagesRootPath string Optional images directory path.
return void