Report

Contents

General
CanvasSpec
CloudAssessSpec
CollegePreferenceService
CsvBuilder
DocumentService
DocumentSpec
EmailSpec
ExportSpec
MailchimpSpec
Mask
MicropowerSpec
Money
Preferences
QualityResultSpec
ReportSpec
SmsSpec
SystemUserService
Database objects
ACLAccessKey
ACLRole
Account
AccountTransaction
Application
ApplicationFieldConfiguration
Article
ArticleProduct
Assessment
AssessmentClass
AssessmentSubmission
AttachmentData
Attendance
AutomationBinding
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
EnrolmentFieldConfiguration
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
SaleOrder
Script
Session
SessionModule
Site
Student
StudentConcession
Survey
SurveyFieldConfiguration
SystemUser
Tag
TagRelation
TagRequirement
Tax
TrainingPackage
Tutor
TutorAttendance
UnavailableRule
Voucher
VoucherPaymentIn
VoucherProduct
WaitingList
WaitingListFieldConfiguration
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
ModuleType
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

automationBindings

Returns Not null List<ReportAutomationBinding>

all the automation bindings for this record, including both variables and options

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