Report

Contents

General
CloudAssessSpec
CollegePreferenceService
CsvBuilder
DocumentService
DocumentSpec
EmailSpec
ExportSpec
MailchimpSpec
Mask
Money
Preferences
QualityResultSpec
ReportSpec
SmsSpec
SystemUserService
Database objects
ACLAccessKey
ACLRole
Account
AccountTransaction
Application
Article
ArticleProduct
Assessment
AssessmentClass
AssessmentSubmission
AttachmentData
Attendance
Banking
Certificate
ClassCost
ConcessionType
Contact
ContactRelation
ContactRelationType
CorporatePass
CorporatePassCourseClass
CorporatePassProduct
Country
Course
CourseClass
CourseClassTutor
CourseModule
CustomField
CustomFieldType
DefinedTutorRole
Discount
DiscountConcessionType
DiscountCourseClass
DiscountMembership
DiscountMembershipRelationType
Document
DocumentVersion
EmailTemplate
Enrolment
EntityRelation
ExportTemplate
Field
FieldConfiguration
FieldConfigurationScheme
FieldHeading
FundingSource
FundingUpload
FundingUploadOutcome
Import
Invoice
InvoiceDueDate
InvoiceLine
InvoiceLineDiscount
Language
Membership
MembershipProduct
Message
MessagePerson
Module
Note
Outcome
PayLine
PayRate
PaymentIn
PaymentInLine
PaymentMethod
PaymentOut
PaymentOutLine
Payslip
Preference
PriorLearning
Product
ProductItem
Qualification
Report
ReportOverlay
Room
SavedFind
Script
Session
SessionModule
Site
Student
StudentConcession
Survey
SystemUser
Tag
TagRelation
TagRequirement
Tax
TrainingPackage
Tutor
TutorAttendance
UnavailableRule
Voucher
VoucherPaymentIn
VoucherProduct
WaitingList
Enumerations
AccountTransactionType
AccountType
ApplicationStatus
AttachmentInfoVisibility
AttachmentSpecialType
AttendanceType
AvetmissStudentDisabilityType
AvetmissStudentEnglishProficiency
AvetmissStudentIndigenousStatus
AvetmissStudentLabourStatus
AvetmissStudentPriorEducation
AvetmissStudentSchoolLevel
ClassCostFlowType
ClassCostRepetitionType
ClassFundingSource
ClientIndustryEmploymentType
ClientOccupationIdentifierType
ConfirmationStatus
ContactDuplicateStatus
CourseClassAttendanceType
CourseEnrolmentType
CreditCardType
CreditLevel
CreditProviderType
CreditType
DeliveryMode
DeliverySchedule
DiscountType
EnrolmentStatus
EnrolmentVETFeeHelpStatus
EntityRelationType
ExpiryType
FieldConfigurationType
InvoiceType
KeyCode
KeyCollision
MessageStatus
MessageType
MoneyRounding
NodeSpecialType
OutcomeStatus
PaymentSource
PaymentStatus
PaymentType
PayslipStatus
PostcodeType
ProductStatus
ProductType
QualificationType
RecognitionOfPriorLearningIndicator
StudentCitizenship
StudentStatusForUnitOfStudy
StudyReason
SurveyTypeSource
SurveyVisibility
TriggerType
UsiStatus
VETFeeExemptionType
VoucherPaymentStatus

Report template which can be printed or saved to PDF. Reports are usually printed from onCourse user interface, but can also be generated from within a script. For example:

	report {
	    keycode "ish.onCourse.studentDetailsReport"
	    records ObjectSelect.query(Contact).select(args.context)
	}

Optionaly you can use extended list of arguments:

	report {
	    keycode "ish.onCourse.studentDetailsReport"
	    entity "Contact"
	    records ObjectSelect.query(Contact).select(args.context)
	    background  "backgroundName"
	    param "dateRange_from" :  Date.parse("yyyy-MM-dd", "2016-01-01"),  "dateRange_to" : Date.parse("yyyy-MM-dd", "2016-01-02")
	}

'param' argument is Map<String, Object> which currently acceptable for dateRange_from/dateRange_to values. This parameters are required for some reports when you need to determine reportable period (the same possibility presented on user interface). If client app run in different time zone with server app you need to provide date range parameters in corresponded server time zone to be sure that output report result will correct: Date.parse("yyyy-MM-dd Z", "2016-01-01 +1100") If you want to print report from records source which has different type with report entity type (Account Transaction report from contacts records for example) then you need provide 'entity' (entity "Contact") parameter Keep 'param' map as generic (Object data type) to possible extension of acceptable arguments in future. 'background' argument is name of available ReportOverlay records which stored in onCourse system. You can manage it through user interface: File -> Preference -> Reports -> press on cogwheel (top right corner) -> 'Manage print backgrounds' This will return PDF report represented in binary format, which you can for example save to a file or send in an email as an attachment:

smtp {
		from "test@test.com"
	to "test@test.com"
	subject "report example"
	content "report printing example"
	attachment "report.pdf", "application/pdf", report {
		keycode "ish.onCourse.studentDetailsReport"
		records ObjectSelect.query(Contact).select(args.context)
	}
}

 
        public 
        Report
     {
}

Instance methods

addTag(tag)

Add a tag to this object. If the tag requirements don't allow this tag to be added, then this method does nothing and returns false.

Tag tag

the tag you want to add

Returns boolean

true if the tag is found and added

addTag(path)

Add a tag to this object. You need to pass the full path to the tag, for example "Subjects/Arts/Painting". If the tag requirements don't allow this tag to be added, then this method does nothing and returns false.

String path

the full path to the tag

Returns boolean

true if the tag is found and added

createdOn

Returns Date

the date and time this record was created

data

Returns Not null byte[]

report content as byte array

description

Returns String

description of this report

entity

Returns Not null String

root entity for this report

followingReports

A report can be set to automatically chain another report to immediately follow it and print together.

Returns Nullable String

the keycode of another report which follows this one

isVisible

Returns Not null Boolean

true if report is shown in the print dialog selection list (mainly used to hide subreports)

keyCode

Returns Not null String

unique key code of this report

modifiedOn

Returns Date

the date and time this record was modified

name

Returns Not null String

name of this report

pageBreakType

Reports can be a list type where every record appears right after the previous, breaking pages only when we run out of paper. Or they can have a page break after each record. For example, each invoice might start on a new page.

Returns Nullable PageBreakType

the type of page breaking for this report

report

Returns Nullable String

report as string

tags

Returns Not null List<Tag>

The list of tags assigned to report

tags

Get all tags related to this object.

Returns List<Tag>

List of related tags

versionNumber

Returns Not null Integer

version number of this report

hasTag(path)

Check to see whether this object has this tag. Either pass the name of a tag (for example "Painting") or the full path to the tag, for example "Subjects/Arts/Painting".

String path

the tag name or the full path to the tag

Returns boolean

true if the tag is found and is attached to this object

hasTag(path, isSearchWithChildren)

Check to see whether this object has this tag or it's child tag. Either pass the name of a tag (for example "Painting") or the full path to the tag, for example "Subjects/Arts/Painting".

String path

the tag name or the full path to the tag

boolean isSearchWithChildren

flag to define whether need to find in children tags or not

Returns boolean

true if the tag or it's children is found and is attached to this object

removeTag(tag)

Remove a tag from this object. If the tag isn't already attached, this method does nothing and returns false.

Tag tag

the tag you want to remove

Returns boolean

true if the tag was found and removed

removeTag(path)

Remove a tag from this object. You need to pass the full path to the tag, for example "Subjects/Arts/Painting". If the tag isn't already attached, this method does nothing and returns false.

String path

the full path to the tag

Returns boolean

true if the tag was found and removed