- CFML Reference User Guide
- ColdFusion functions
- ColdFusion functions by category
- Functions a-b
- Abs
- ACos
- AddSOAPRequestHeader
- AddSOAPResponseHeader
- AjaxLink
- AjaxOnLoad
- ApplicationStop
- ArrayAppend
- ArrayAvg
- ArrayClear
- ArrayContains
- ArrayContainsNoCase
- ArrayDelete
- ArrayDeleteAt
- ArrayDeleteNoCase
- ArrayEach
- ArrayFilter
- ArrayFind
- ArrayFindAll
- ArrayFindAllNoCase
- ArrayFindNoCase
- ArrayInsertAt
- ArrayIsDefined
- ArrayIsEmpty
- ArrayLen
- ArrayMap
- ArrayMax
- ArrayMin
- ArrayNew
- ArrayPrepend
- ArrayReduce
- ArrayResize
- ArraySet
- ArraySetMetadata
- ArraySlice
- ArraySort
- ArraySum
- ArraySwap
- ArrayToList
- Asc
- ASin
- Atn
- AuthenticatedContext
- AuthenticatedUser
- BinaryDecode
- BinaryEncode
- BitAnd
- BitMaskClear
- BitMaskRead
- BitMaskSet
- BitNot
- BitOr
- BitSHLN
- BitSHRN
- BitXor
- BooleanFormat
- Abs
- Functions-c-d
- CacheGet
- CacheGetAllIds
- CacheGetMetadata
- CacheGetProperties
- CacheGetSession
- CacheIdExists
- CachePut
- CacheRegionExists
- CacheRegionNew
- CacheRegionRemove
- CacheRemove
- CacheRemoveAll
- CacheSetProperties
- CallStackDump
- CallStackGet
- CanDeSerialize
- Canonicalize
- CanSerialize
- Ceiling
- CharsetDecode
- CharsetEncode
- Chr
- CJustify
- Compare
- CompareNoCase
- Cos
- CreateDate
- CreateDateTime
- CreateObject
- CreateObject: .NET object
- CreateObject: COM object
- CreateObject: component object
- CreateObject: CORBA object
- CreateObject: Java or EJB object
- CreateObject: web service object
- CreateODBCDate
- CreateODBCDateTime
- CreateODBCTime
- CreateSignedJWT
- CreateEncryptedJWT
- CreateTime
- CreateTimeSpan
- CreateUUID
- CSRFGenerateToken
- CSRFVerifyToken
- DateAdd
- DateCompare
- DateConvert
- DateDiff
- DateFormat
- DatePart
- DateTimeFormat
- Day
- DayOfWeek
- DayOfWeekAsString
- DayOfYear
- DaysInMonth
- DaysInYear
- DE
- DecimalFormat
- DecodeForHTML
- DecodeFromURL
- DecrementValue
- Decrypt
- DecryptBinary
- DeleteClientVariable
- Deserialize
- DeserializeJSON
- DeserializeXML
- DirectoryCopy
- DirectoryCreate
- DirectoryDelete
- DirectoryExists
- DirectoryList
- DirectoryRename
- DollarFormat
- DotNetToCFType
- Duplicate
- Functions-e-g
- EncodeForCSS
- EncodeForDN
- EncodeForHTML
- EncodeForHTMLAttribute
- EncodeForJavaScript
- EncodeForLDAP
- EncodeForURL
- EncodeForXML
- EncodeForXMLAttribute
- EncodeForXpath
- Encrypt
- EncryptBinary
- EntityDelete
- EntityLoad
- EntityLoadByExample
- EntityLoadByPK
- EntityMerge
- EntityNew
- EntityReload
- EntitySave
- EntityToQuery
- Evaluate
- Exp
- ExpandPath
- FileClose
- FileCopy
- FileDelete
- FileExists
- FileGetMimeType
- FileIsEOF
- FileMove
- FileOpen
- FileRead
- FileReadBinary
- FileReadLine
- FileSeek
- FileSetAccessMode
- FileSetAttribute
- FileSetLastModified
- FileSkipBytes
- FileUpload
- FileUploadAll
- FileWrite
- FileWriteLine
- Find
- FindNoCase
- FindOneOf
- FirstDayOfMonth
- Fix
- Floor
- FormatBaseN
- GeneratePBKDFKey
- GenerateSecretKey
- GetApplicationMetadata
- GetAuthUser
- GetBaseTagData
- GetBaseTagList
- GetBaseTemplatePath
- GetClientVariablesList
- GetComponentMetaData
- GetContextRoot
- GetCPUUsage
- GetCurrentTemplatePath
- GetDirectoryFromPath
- GetEncoding
- GetException
- GetFileFromPath
- GetFileInfo
- GetFreeSpace
- GetFunctionCalledName
- GetFunctionList
- GetGatewayHelper
- GetHttpRequestData
- GetHttpTimeString
- GetK2ServerDocCount
- GetK2ServerDocCountLimit
- GetLocale
- GetLocaleDisplayName
- GetLocalHostIP
- GetMetaData
- GetMetricData
- GetPageContext
- GetPrinterInfo
- GetPrinterList
- GetProfileSections
- GetProfileString
- GetReadableImageFormats
- GetSafeHTML
- GetSAMLAuthRequest
- GetSAMLLogoutRequest
- GenerateSAMLSPMetadata
- GetSOAPRequest
- GetSOAPRequestHeader
- GetSOAPResponse
- GetSOAPResponseHeader
- GetSystemFreeMemory
- GetSystemTotalMemory
- GetTempDirectory
- GetTempFile
- GetTemplatePath
- GetTickCount
- GetTimeZoneInfo
- GetToken
- GetTotalSpace
- GetUserRoles
- GetVFSMetaData
- GetWriteableImageFormats
- Functions-h-im
- Hash
- HMac
- Hour
- HQLMethods
- HTMLCodeFormat
- HTMLEditFormat
- IIf
- ImageAddBorder
- ImageBlur
- ImageClearRect
- ImageCopy
- ImageCreateCaptcha
- ImageCrop
- ImageDrawArc
- ImageDrawBeveledRect
- ImageDrawCubicCurve
- ImageDrawLine
- ImageDrawLines
- ImageDrawOval
- ImageDrawPoint
- ImageDrawQuadraticCurve
- ImageDrawRect
- ImageDrawRoundRect
- ImageDrawText
- ImageFlip
- ImageGetBlob
- ImageGetBufferedImage
- ImageGetEXIFMetadata
- ImageGetEXIFTag
- ImageGetHeight
- ImageGetIPTCMetadata
- ImageGetIPTCTag
- ImageGetMetadata
- ImageGetWidth
- ImageGrayscale
- ImageInfo
- ImageMakeColorTransparent
- ImageMakeTranslucent
- ImageNegative
- ImageNew
- ImageOverlay
- ImagePaste
- ImageRead
- ImageReadBase64
- ImageResize
- ImageRotate
- ImageRotateDrawingAxis
- ImageScaleToFit
- ImageSetAntialiasing
- ImageSetBackgroundColor
- ImageSetDrawingColor
- ImageSetDrawingStroke
- ImageSetDrawingTransparency
- ImageSharpen
- ImageShear
- ImageShearDrawingAxis
- ImageTranslate
- ImageTranslateDrawingAxis
- ImageWrite
- ImageWriteBase64
- ImageXORDrawingMode
- Functions-in-k
- IncrementValue
- InputBaseN
- Insert
- Int
- InvalidateOauthAccesstoken
- Invoke
- InitSAMLAuthRequest
- InitSAMLLogoutRequest
- InvokeCFClientFunction
- IsArray
- IsAuthenticated
- IsAuthorized
- IsBinary
- IsBoolean
- IsClosure
- IsCustomFunction
- IsDate
- IsDateObject
- IsDDX
- IsDebugMode
- IsDefined
- IsImage
- IsImageFile
- IsInstanceOf
- IsIPv6
- IsJSON
- IsK2ServerABroker
- IsK2ServerDocCountExceeded
- IsK2ServerOnline
- IsLeapYear
- IsLocalHost
- IsNull
- IsNumeric
- IsNumericDate
- IsObject
- isOnline
- IsPDFArchive
- IsPDFFile
- IsPDFObject
- IsProtected
- IsQuery
- isSamlLogoutResponse
- isSafeHTML
- IsSimpleValue
- IsSOAPRequest
- IsSpreadsheetFile
- IsSpreadsheetObject
- IsStruct
- IsUserInAnyRole
- IsUserInRole
- IsUserLoggedIn
- IsValid
- IsValidOauthAccesstoken
- IsWDDX
- IsXML
- IsXmlAttribute
- IsXmlDoc
- IsXmlElem
- IsXmlNode
- IsXmlRoot
- JavaCast
- JSStringFormat
- Functions-l
- LCase
- Left
- Len
- ListAppend
- ListChangeDelims
- ListContains
- ListContainsNoCase
- ListDeleteAt
- ListEach
- ListFilter
- ListFind
- ListFindNoCase
- ListFirst
- ListGetAt
- ListInsertAt
- ListLast
- ListLen
- ListMap
- ListPrepend
- ListQualify
- ListReduce
- ListRemoveDuplicates
- ListRest
- ListSetAt
- ListSort
- ListToArray
- ListValueCount
- ListValueCountNoCase
- LJustify
- Location
- Log
- Log10
- LSCurrencyFormat
- LSDateFormat
- LSDateTimeFormat
- LSEuroCurrencyFormat
- LSIsCurrency
- LSIsDate
- LSIsNumeric
- LSNumberFormat
- LSParseCurrency
- LSParseDateTime
- LSParseEuroCurrency
- LSParseNumber
- LSTimeFormat
- LTrim
- Functions-m-r
- Max
- Mid
- Min
- Minute
- Month
- MonthAsString
- Now
- NumberFormat
- ObjectEquals
- ObjectLoad
- ObjectSave
- OnWSAuthenticate
- ORMClearSession
- ORMCloseAllSessions
- ORMCloseSession
- ORMEvictCollection
- ORMEvictEntity
- ORMEvictQueries
- ORMExecuteQuery
- ORMFlush
- ORMFlushall
- ORMGetSession
- ORMGetSessionFactory
- ORMIndex
- ORMIndexPurge
- ORMReload
- ORMSearch
- ORMSearchOffline
- ParagraphFormat
- ParameterExists
- ParseDateTime
- Pi
- PrecisionEvaluate
- ProcessSAMLResponse
- ProcessSAMLLogoutRequest
- Quarter
- PreserveSingleQuotes
- QueryAddColumn
- QueryAddRow
- QueryConvertForGrid
- QueryExecute
- QueryFilter
- QueryGetResult
- QueryGetRow
- QueryKeyExists
- QueryMap
- QueryNew
- QueryReduce
- QuerySetCell
- QuotedValueList
- QueryEach
- Rand
- Randomize
- RandRange
- ReEscape
- REFind
- REFindNoCase
- ReleaseComObject
- REMatch
- REMatchNoCase
- RemoveCachedQuery
- RemoveChars
- RepeatString
- Replace
- ReplaceList
- ReplaceNoCase
- REReplace
- REReplaceNoCase
- RestDeleteApplication
- RestSetResponse
- RestInitApplication
- Reverse
- Right
- RJustify
- Round
- RTrim
- Functions-s
- Second
- SendGatewayMessage
- SendSAMLLogoutResponse
- Serialize
- SerializeJSON
- SerializeXML
- SessionInvalidate
- SessionRotate
- SessionGetMetaData
- SessionInvalidate
- SessionRotate
- SetDay
- SetEncoding
- SetHour
- SetLocale
- SetMonth
- SetProfileString
- SetVariable
- SetYear
- Sgn
- Sin
- Sleep
- SpanExcluding
- SpanIncluding
- SpreadsheetAddAutoFilter
- SpreadsheetAddColumn
- SpreadsheetAddFreezePane
- SpreadsheetAddImage
- SpreadsheetAddInfo
- SpreadsheetAddPageBreaks
- SpreadsheetAddRow
- SpreadsheetAddRows
- SpreadsheetAddSplitPane
- SpreadsheetCreateSheet
- SpreadsheetDeleteColumn
- SpreadsheetDeleteColumns
- SpreadsheetDeleteRow
- SpreadsheetDeleteRows
- SpreadsheetFormatCell
- SpreadsheetFormatColumn
- SpreadsheetFormatCellRange
- SpreadsheetFormatColumn
- SpreadsheetFormatColumns
- SpreadsheetFormatRow
- SpreadsheetFormatRows
- SpreadsheetGetCellComment
- SpreadsheetGetCellFormula
- SpreadsheetGetCellValue
- SpreadsheetGetColumnCount
- SpreadsheetInfo
- SpreadsheetMergeCells
- SpreadsheetNew
- SpreadsheetRead
- SpreadsheetReadBinary
- SpreadsheetRemoveSheet
- SpreadsheetSetActiveSheet
- SpreadsheetSetActiveSheetNumber
- SpreadsheetSetCellComment
- SpreadsheetSetCellFormula
- SpreadsheetSetCellValue
- SpreadsheetSetColumnWidth
- SpreadsheetSetFooter
- SpreadsheetSetHeader
- SpreadsheetSetRowHeight
- SpreadsheetShiftColumns
- SpreadsheetShiftRows
- SpreadsheetWrite
- Sqr
- StripCR
- StructAppend
- StructClear
- StructCopy
- StructCount
- StructDelete
- StructEach
- StructFilter
- StructFind
- StructFindKey
- StructFindValue
- StructGet
- StructGetMetadata
- StructInsert
- StructIsEmpty
- StructKeyArray
- StructKeyExists
- StructKeyList
- StructMap
- StructNew
- StructReduce
- StructSetMetadata
- StructSort
- StructToSorted
- StructUpdate
- StoreSetMetadata
- StoreGetACL
- StoreGetMetadata
- StoreAddACL
- StoreSetACL
- Functions-t-z
- Tan
- ThreadJoin
- ThreadTerminate
- Throw
- TimeFormat
- ToBase64
- ToBinary
- ToScript
- ToString
- Trace
- Transactionandconcurrency
- TransactionCommit
- TransactionRollback
- TransactionSetSavePoint
- Trim
- UCase
- URLDecode
- URLEncodedFormat
- URLSessionFormat
- Val
- ValueList
- VerifyClient
- Week
- Wrap
- WriteDump
- WriteLog
- WriteOutput
- WSGetAllChannels
- WSGetSubscribers
- WSPublish
- WSSendMessage
- XmlChildPos
- XmlElemNew
- XmlFormat
- XmlGetNodeType
- XmlNew
- XmlParse
- XmlSearch
- XmlTransform
- XmlValidate
- Year
- YesNoFormat
- ColdFusion Tags
- ColdFusion tag summary
- ColdFusion tags by category
- Application framework tags
- Communications tags
- Database manipulation tags
- Data output tags
- Debugging tags
- Exception handling tags
- Extensibility tags
- File management tags
- Flow-control tags
- Forms tags
- Internet Protocol tags
- Page processing tags
- Security tags
- Variable manipulation tags
- Other tags
- Tags a-b
- Tags c
- Tags f
- cffeed
- cffile
- cffile action = "append"
- cffile action = "copy"
- cffile action = "delete"
- cffile action = "move"
- cffile action = "read"
- cffile action = "readBinary"
- cffile action = "rename"
- cffile action = "upload"
- cffile action = "uploadAll"
- cffile action = "write"
- cffileupload
- cffinally
- cfflush
- cfform
- cfformgroup
- cfformitem
- cfftp
- cfftp: Connection: file and directory operations
- cfftp: Opening and closing FTP server connections
- cfftp : Opening and closing secure FTP server connections
- cfftp action = "listDir"
- cffunction
- Tags g-h
- Tags i
- Tags j-l
- cfjava
- cflayout
- cflayoutarea
- cfldap
- cflocation
- cflock
- cflog
- cflogin
- cfloginuser
- cflogout
- cfloop
- cfloop : conditional loop
- cfloop : index loop
- cfloop : looping over a COM collection or structure
- cfloop : looping over a date or time range
- cfloop : looping over a list, a file, or an array
- cfloop : looping over a query
- Tags m-o
- cfmail
- cfmailparam
- cfmailpart
- cfmap
- cfmapitem
- cfmediaplayer
- cfmenu
- cfmenuitem
- cfmessagebox
- cfmodule
- cfNTauthenticate
- cfoauth
- cfobject
- cfobject: .NET object
- cfobject: COM object
- cfobject: component object
- cfobject: CORBA object
- cfobject: Java or EJB object
- cfobject: web service object
- cfobjectcache
- cfoutput
- Tags p-q
- Tags r-s
- Tags t
- Tags u-z
- CFML Reference
- Reserved words and variables
- Ajax JavaScript functions
- Ajax JavaScript functions
- Function summary Ajax
- ColdFusion.Ajax.submitForm
- ColdFusion.Autosuggest.getAutosuggestObject
- ColdFusion.Layout.enableSourceBind
- ColdFusion.MessageBox.getMessageBoxObject
- ColdFusion.ProgressBar.getProgressBarObject
- ColdFusion.MessageBox.isMessageBoxDefined
- JavaScriptFunctionsinColdFusion9Update1
- ColdFusion ActionScript functions
- ColdFusion mobile functions
- Application.cfc reference
- Script functions implemented as CFCs
- ColdFusion Flash Form style reference
- Styles valid for all controls
- Styles for cfform
- Styles for cfformgroup with horizontal or vertical type attributes
- Styles for box-style cfformgroup elements
- Styles for cfformgroup with accordion type attribute
- Styles for cfformgroup with tabnavigator type attribute
- Styles for cfformitem with hrule or vrule type attributes
- Styles for cfinput with radio, checkbox, button, image, or submit type attributes
- Styles for cftextarea tag and cfinput with text, password, or hidden type attributes
- Styles for cfselect with size attribute value of 1
- Styles for cfselect with size attribute value greater than 1
- Styles for cfcalendar tag and cfinput with dateField type attribute
- Styles for the cfgrid tag
- Styles for the cftree tag
- ColdFusion Flash Form Style Reference
- ColdFusion event gateway reference
- ColdFusion Event Gateway reference
- addEvent
- CFEvent
- CFEventclass
- Constructor
- Gateway development interfaces and classes
- getStatus
- setCFCPath
- setCFCMethod
- getOriginatorID
- getLogger
- getBuddyList
- getBuddyInfo
- IM gateway message sending commands
- IM Gateway GatewayHelper class methods
- onIncomingMessage
- onIMServerMessage
- onBuddyStatus
- onAddBuddyResponse
- onAddBuddyRequest
- IM Gateway CFC incoming message methods
- IM gateway methods and commands
- CFML CFEvent structure
- warn
- info
- setOriginatorID
- data command
- submit Multi command
- submit command
- setGatewayType
- setGatewayID
- setData
- setCFCListeners
- outgoingMessage
- getStatusTimeStamp
- numberOfMessagesReceived
- numberOfMessagesSent
- removeBuddy
- removeDeny
- removePermit
- setNickName
- setPermitMode
- setStatus
- SMS Gateway CFEvent structure and commands
- SMS Gateway incoming message CFEvent structure
- getStatusAsString
- getProtocolName
- getPermitMode
- getPermitList
- getNickName
- getName
- getDenyList
- getCustomAwayMessage
- getQueueSize
- getMaxQueueSize
- getHelper
- getGatewayType
- getGatewayServices
- getGatewayID_1
- getGatewayID
- getData
- getCFCTimeout
- setCFCTimeout
- getCFCPath
- getCFCMethod
- GatewayServices class
- Gateway interface
- GatewayHelper interface
- addPermit
- addDeny
- addBuddy
- error
- debug
- Logger class
- stop
- start
- CFML event gateway SendGatewayMessage data parameter
- restart
- fatal
- SMS gateway message sending commands
- ColdFusion C++ CFX Reference
- ColdFusion Java CFX reference
- WDDX JavaScript Objects
- Cloud services
- ColdFusion and GCP Storage
- ColdFusion and GCP Firestore
- ColdFusion and GCP PubSub
- ColdFusion and Amazon S3
- ColdFusion and DynamoDB
- ColdFusion and Amazon SQS
- ColdFusion and Amazon SNS
- ColdFusion and MongoDB
- ColdFusion and Azure Blob
- ColdFusion and Azure Service Bus
- Multi-cloud storage services
- Multi-cloud RDS databases
- ColdFusion and Azure Cosmos DB
Adobe ColdFusion Builder is End of Life from Oct 1, 2024
Thank you for being part of the exciting journey of Adobe ColdFusion Builder.
As Adobe continues to focus on ColdFusion Builder extension for Visual Studio Code as the IDE for Adobe ColdFusion, we have decided to End of Life (EOL) Adobe ColdFusion Builder on Oct 1, 2024.
View the End of Life (EOL) announcement for ColdFusion Builder.
Description
Used to do either of the following:
- Execute a report created with the ColdFusion Report Builder, displaying it in PDF, Adobe FlashPaper, RTF, HTML, XML or Excel format. Optionally, you can save this report to a file.
- Run a predefined Crystal Reports report. Applies only to Windows systems.
Category
Syntax
ColdFusion Report Builder syntax: <cfreport format = "PDF|FlashPaper|Excel|RTF|HTML|XML" template = "absolute pathname or pathname relative to the report file" encryption = "128-bit|40-bit|none" filename = "output filename" name = "ColdFusion variable" ownerpassword = "password" overwrite = "no|yes" permissions = "permission list" query = "query variable" resourceTimespan = #CreateTimeSpan (days, hours, minutes, seconds)# style = "CSS style definition or css file pathname" userpassword = "password"> <cfreportparam ...> </cfreport> Crystal Reports syntax: <cfreport report = "report path" dataSource = "data source name" formula = "formula" orderBy = "result order" password = "password" timeout = "number of seconds" type = "standard|netscape|microsoft" username = "username"> </cfreport>
You can specify this tag's attributes in an attributeCollection attribute whose value is a structure. Specify the structure name in the attributeCollection attribute and use the tag's attribute names as structure keys.
See also
cfcollection, cfdocument, cfdocumentitem, cfdocumentsection, cfexecute, cfindex, cfobject, cfreportparam,
cfsearch, cfwddx; Creating Reports with Report Builder in the Developing ColdFusion Applications; Report Builder online Help
History
ColdFusion 8: Added the style and resourceTimespan attributes. Added the HTML and XML values to the format attribute.ColdFusion MX 7.0.1: Added the RTF value to the format attribute, to let you generate reports in RTF format.ColdFusion MX 7: Added support for the ColdFusion Report Builder.ColdFusion MX: Changed data source connection behavior: Crystal Reports now establishes an independent connection to the data source. The connection is not subject to any ColdFusion data source-specific restrictions. For example, the Crystal Reports server can access a data source, regardless of whether it is disabled in the ColdFusion Administrator.
Attributes
Attribute |
Applies to |
Req/Opt |
Default |
Description |
||
---|---|---|---|---|---|---|
datasource |
Crystal |
Optional |
|
Name of registered or native data source. |
||
encryption |
Report |
Optional |
none |
(format="PDF" only) Type of encryption for the report output.
|
||
filename |
Report |
Optional |
|
Filename to contain the report. You cannot specify both the name |
||
format |
Report |
Required |
|
Format of the report output:
|
||
formula |
Crystal |
Optional |
|
One or more named formulas. Terminate each formula with a semicolon. Use the format:
If you use a semicolon in a formula, escape it by typing it twice (\;;). For example:
|
||
name |
Report |
Optional |
|
Name of the ColdFusion variable that contains the report output. You cannot specify |
||
orderBy |
Crystal |
Optional |
|
Orders results according to your specifications. |
||
overwrite |
Report |
Optional |
no |
Specifies whether to overwrite files that have the same name as that specified in the
|
||
owner |
Report |
Optional |
|
(format="PDF" only) Owner password for the report, |
||
password |
Crystal |
Optional |
|
Password that corresponds to username required for database access. Overrides |
||
permissions |
Report |
Optional |
|
(format="PDF" only) Specifies one or more of the following permissions:
|
||
query |
Report |
Optional |
|
Name of the query that contains input data for the report. This query overrides the |
||
report |
Crystal |
Required |
|
Report pathname. Store Crystal Reports files in the same directories as ColdFusion |
||
resource |
Report |
Optional |
5 minutes |
(format="HTML" only) Life span of the resource directory. When you export a |
||
style |
Report |
Optional |
|
Style in CSS format that overrides a style defined in the Report Builder report at run |
||
template |
Report |
Required |
|
Specifies the pathname to the Report Builder (CFR) file, relative to the web root. |
||
timeout |
Crystal |
Optional |
|
Specifies the maximum time, in seconds, in which a connection must be made to a |
||
type |
Crystal |
Optional |
standard |
Type of report:
|
||
userName |
Crystal |
Optional |
|
Username required for entry into a database from which the report is created. Overrides |
||
user |
Report |
Optional |
|
(format="PDF" only) User password.
|
Usage
Use this tag to generate a report using a report definition created in either ColdFusion Report Builder or in Crystal Reports. (For more information on using the ColdFusion Report Builder, display the online help by opening the Report Builder and pressing F1.)
The Excel report output format type provides limited support for the formatting options available in ColdFusion Reporting. Images and charts are not supported and numeric data containing formatting (commas, percents, currency, and so on) appear as plain text in Excel. The Excel output format supports simple reports only and Adobe recommends that you give careful design and layout consideration to reports designed for Excel output.
This tag requires an end tag.
Using Cascading Style Sheets
You can override Cascading Style Sheets (CSS) in Report Builder reports at run time by using the style attribute of the cfreport tag in ColdFusion.
You can create CSS files in one of two ways: by exporting styles with the Export Report Styles icon in Report Builder or by creating a CSS file in any text editor. For the CSS styles to take effect, however, you must use Report Builder to assign the style names to the elements in the report. (The exception is the default style: you can use the style attribute to define the default style in ColdFusion and apply it to the report even if the default style is not defined in Report Builder.)After you assign the style names in Report Builder, you can update the style definitions in the CSS file at any time and apply them at run time by using the cfreport and cfreportparam tags. If your report contains subreports, the default style applies to the master report and to all of the subreports. If the master report uses CSS styles other than the default style, the CSS styles do not apply to the subreports unless you specify them explicitly.
The following code shows how to apply three different style sheets to the main report and two subreports at run time:
<cfreport template="myreport.cfr" style="mystyle.css" format="PDF"> <cfreportParam subreport="subreport1" style="subreport1-style.css"> <cfreportParam subreport="subreport2" style="subreport2-style.css"> </cfreport>
The following code shows how to apply a CSS style as a value of the style attribute:
<cfreport template="myreport.cfr" style='mystyle { defaultStyle: true; font-family:"Comic Sans MS"; color: ##00FF00; }' format="FlashPaper"> </cfreport>
The following code shows how to create a variable called myStyle and use it as a value of the style attribute:
<cfset mystyle='mystyle { defaultStyle: false; font-family: "Comic Sans MS"; }'> <cfreport template="myreport.cfr" style="#mystyle#" format="HTML"> </cfreport>
Style attribute syntax
The style file or string must be valid CSS syntax. For more information, see http://www.w3.org/Style/CSS/. The style must contain one or more rule sets. Each rule set consists of a simple selector, which is the Report Builder style name, followed by a declaration block, which consists of a series of declarations separated by semicolons. A declaration is a property:value pair.
If a selector contains invalid syntax, ColdFusion ignores the selector and its declaration block. Selectors and properties not supported by this feature are ignored. Styles are case-insensitive, except parts not under the control of CSS (such as font names).
The following example shows the CSS definition for the default style:
DefaultStyle { default-style: true; color: black; font-family: Arial, "Comic Sans MS"; font-size: 16; text-decoration: underline; }
The following example shows the CSS definition for a custom style called PurpleBoldItalicText:
PurpleBoldItalicText { color: purple; font: italic bold 20px 30px Arial; }
Identifiers for styles must be CSS2-compliant. For example, CSS1 allows '_' in identifiers, but CSS2 does not.
In CSS2, identifiers, including element names, classes, and IDs in selectors, can contain only the characters A-Z, a-z, and 0-9. Also, they can include ISO 10646 characters 161 and higher and the hyphen character (-); however, identifiers cannot start with a hyphen or a digit. They can contain escaped characters and any ISO 10646 character as a numeric code. For example, you can write the identifier "B&W?" as "B\&W?" or "B\26 W\3F".
Style properties
The following table shows the style properties exported by Report Builder:
Property name |
Report Builder only |
Valid values |
Description |
---|---|---|---|
background-color |
No |
See the section Valid color values |
Background color of the specified report element, if the element is not transparent. The default background color is white. |
border |
No |
border-width |
A shorthand property that specifies the border-width, border-style, and border-color properties for all of the borders in an element. |
border-color |
No |
See the section Valid color values |
Border color for text, images, and charts. You can customize each side of the border. The default color is white. |
border-style |
No |
solid |
A shorthand property that specifies the border-top-style, border-right-style, border-bottom-style, and border-left-style (the comma-separated values must be in this order). If one or more values are not specified, the value for the opposite side is used. If only one value is listed, that value applies to all sides. |
border-top-colorborder-left-colorborder-bottom-colorborder-right-color |
No |
See the section Valid color values |
Color of the element's top, left, bottom, and right border. For more details see that section Border and margin styles. |
border-top-styleborder-left-styleborder-bottom-styleborder-right-style |
No |
solid |
Line style of the element's top, left, bottom, and right border. For more details see the section Border and margin styles.Any value other than dashed displays as solid. |
border-top-widthborder-left-widthborder-bottom-widthborder-right-width |
No |
thin |
Thickness of the top, left, bottom, and right border of an element. Negative values are not valid. For more details see the section Border and margin styles:
|
border-width |
No |
thin |
A shorthand property that specifies the border-top-width, border-right-width, and border-bottom-width properties with a single property and value notation (the comma-separated values must be in this order). If one or more values are not specified, the value for the opposite side is used. If only one value is listed, it applies to all sides:
|
clip |
No |
auto |
Specifies how images are resized:
|
color |
No |
See the section Valid color values |
Color of the text (in text elements) and the border (in graphic elements). The default color is black. |
corner-radius |
Yes |
integer |
Radius for arcs used to draw the corner of rectangles. The default is 0 (square corners). Values less than 0 are interpreted as 0. |
default-style |
Yes |
true |
Default style for elements that do not or cannot have a style applied. A subreport inherits its parent's default-style if it does not have one of its own. |
embed-pdf-font |
Yes |
true |
Specifies whether fonts are embedded in the PDF document. Embedded fonts insure that the fonts display properly even if the font is not installed on the system where the report is viewed. |
empty-cells |
No |
show |
Shows or hides a null value for text expressions:
|
font |
No |
font-style |
Font characteristic specifications. Use this as a shorthand to specifying multiple property values; for example:font: italic 20px Arial;Default values for this property match those used for the individual properties. Default values for the individual properties are applied to the values omitted from the font property. |
font-family |
No |
Comma-separated list of font names. |
Group of fonts to apply to the element. The first font found in the list is applied to the element. The default is:font-family: Arial, Helvetica, sansserif;If a font name contains spaces, enclose the name in quotation marks, for example:font-family: Courier, "Courier New", Arial; |
font-size |
No |
[length] |
Font size measured in points or pixels. Negative values are not valid. The default value is 10 points. You can specify points or pixels. 1 pixel = 0.75. points. This property also is a component of the font property.Standard CSS supports other types of values not supported by Report Builder. |
font-style |
No |
normal |
Font style. The italic and oblique values are similar. The default value is normal. Also, this property is a component of the font property. |
font-weight |
No |
normal |
Font weight. Report Builder does not support varying degrees of boldness or lightness; therefore, normal and lighter appear as normal; all other values appear as bold. The default is normal. Also, this property is a component of the font property. |
line-height |
No |
normal |
Amount of space between consecutive lines of text:
|
line-size |
Yes |
none |
Type of the border around a graphic element or the type and the thickness of line elements. By default, lines and rectangles have a 1-pixel border; thin is 0.05 pixels. |
margin |
No |
top-integer |
Amount of blank space within the bounding box of an element. This is a shorthand property that specifies the margin-top, margin-right, margin-bottom, and margin-left properties with a single property and value notation (the values must be in this order separated by commas.) If one or more values are not specified, the value for the opposite side is used. If only one value is listed, it applies to all sides. For more details see the section Border and margin styles.CSS margins are transparent, which reveals the background of the parent element. Negative values are valid; this allows for text overlays.Examples:margin: 10,20,30,40; margin: 10; margin: 10,20,30; |
margin-topmargin-leftmargin-bottommargin-right |
No |
integer |
See margin. |
parent-style |
Yes |
styleName |
Name of the parent report style from which this style inherits some or all of its properties. The style name must be defined in either the report or before this style definition in the CSS file or text. |
text-align |
No |
left |
Alignment of text and images on the horizontal axis. The default value is left. |
text-decoration |
No |
underline |
Text characteristics not defined with the font-style and font-weight properties. The color of the text-decoration is determined by the color property for the element. Unknown values are ignored. |
text-rotation |
Yes |
none |
Rotation of text elements. Use it to change the text direction by rotating it 90 degrees to the right or left. |
transparency-mode |
Yes |
opaque |
Transparency of elements. Graphic elements, such as rectangles and lines, are opaque by default, but images are transparent. Subreport elements, static text, and text fields are transparent by default. |
vertical-align |
No |
top |
Alignment of text and images on the vertical axis. The default value is top. |
xhtml-formatted-text |
Yes |
true |
Specifies whether the text element contains XHTML-compatible instructions:
|
Styles or values that are not supported by Report Builder are ignored in the report, in which case, if a default-style is defined, Report Builder applies the default style to the element.
Valid color values
You can specify a color as #RRGGBB. This represents a color that uses a triplet of hexadecimal values concatenated together. The values represent the red, green, and blue components for a given color. The range of each component value is 00-FF in hexadecimal. Also, you can use one of the 140 X11 color names (see http://www.blooberry.com/indexdot/color/x11makerFrameNS.htm). The color name is case-insensitive. This set of names assigns names to specific RGB values. Also, a color name can also be specified as ##RGB, rgb(r,g,b), or rgb(r%,g%,b%). See CSS Color Units for syntax details (see http://www.blooberry.com/indexdot/css/syntax/units/color.htm). UI Name is not supported.
The following example shows the different ways you can represent the color lime:
color:lime color:#00FF00 color:#0F0 color:rgb(0,255,0) color:rgb(0%,50%,0%)
If you specify a color in hexadecimal format as part of the style attribute for the cfreport tag, use the format ##00FF00. For example:
<cfreport template="myreport.cfr" style='mystyle { defaultStyle: true; font-family:"Comic Sans MS"; color: ##00FF00; }' format="HTML"/>
Border and margin styles
Use the border-width, border-style, border-color, and margin properties when all four sides of the element have the same value. You can specify from one to four parameters for these properties:
Number of parameters |
Example |
Result |
---|---|---|
1 |
border-width: thick |
Parameter applied to all four sides of the element's border. |
2 |
border-width: thick, thin |
First parameter (thick) applied to the top and bottom sides; second parameter (thin) applied to the left and right sides. |
3 |
border-width: thick, thin, medium |
First parameter (thick) applied to the top; second parameter (thin) applied to the left and right sides; third parameter (medium) applied to the bottom. |
4 |
border-width: thick, thin, medium, thick |
First parameter (thick) applied to the top; second parameter (thin) applied to the right side; third parameter (medium) applied to the bottom; fourth parameter (thick) applied to the left side. |
You can use the properties for each side of a border to override the style specified by the border-width, border-style, border-color, and margin properties.
Example
Example 1: This example shows the use of cfreport for the ColdFusion Report Builder.
<cfquery name="northwindemployees" datasource="localnorthwind"> SELECT EmployeeID, LastName, FirstName, Title, City, Region, Country FROM Employees ORDER BY Country, City </cfquery> <CFREPORT format="PDF" template="FifthReport.cfr" query="#northwindemployees#"/>
Example 2: This view-only example shows the use of cfreport for Crystal Reports.
<h3>cfreport Tag<h3> <p>cfreport lets reports from the Crystal Reports Professional report writer display through a ColdFusion interface. To run, the tag requires the name of the report. cfreport can also pass information to the report file displayed, to change the output conditions.</p> <p>This example would run a report called "monthlysales.rpt " and pass it an optional filter condition to show only the information for a subset of the report.</p> <cfreport report = '/reports/monthlysales.rpt'> {Departments.Department} = 'International' </cfreport> <p>Substitute your report files and filters for this code. cfreport can put Crystal Reports into web pages.</p>