Report editor tips

From ITR Wiki
Tips and tricks for Report Writing!

What objects can I access?

  • candidate; all information about the candidate
  • session; all session information. If you want to know what tests are in the session check the SessionTests array. This contains all tests that are in the session, which can be usefull.
  • sessiontest; the session test information your report is based on
  • test; the test definition your report is based on
  • candidate; information about the candidate this report is for, like name and birthdate (if entered)


What additional function can I use in the report text?

You can basically use any java expression that will lead to a string result. For example :

  •  %%convertDateToITR(instanceObj.session.SessionEndDateTime)%%; converts the date in ITR internal format to a user readable string. This will also work for BirthDate for example.
  • create a HTML table. For example : %%makeHTMLTable(instanceObj.Scoreprofiel.top20,["Beroep","Berekeningswijze","Score"]);%%. This parameter takes a javascript array as first parameter. The second parameter is the text that will be displayed in the header.


What additional functions can I use in the report script?

Any javascript function supported in the browser. Some functions that can be usefull are the following :

  • this.sessiontest.scale("var name of the scale"). This return the scale object, this.sessiontest.scale("var name of the scale").Score returns the score of the scale
  • normValue function. This function norms the Score (or any value for that matter) using 3 parameters : the value, an array of intervals, an array of resulting norm values. For example : TempNorm = normValue ( this.sessiontest.scale("NW").Score, [ [-99,1] , [1,5] , [5,10] , [10, 17] , [17,22] , [22 ,99] ] , [ 0 , 1 , 2 , 3 , 4 , 5 ] );

You can off course add your own functions to the this variable and then use them in your report.

What do the fields mean?

Field Explanation
%%candidate.EMail%% The email or login of the candidate
%%candidate.FirstName%% First name
%%candidate.LastName%% Last name
%%candidate.Initials%% Initial
%%candidate.TitlesBefore%% Titles before the name of the candidate (not accessible in the system)
%%candidate.TitlesAfter%% Titles after the name of the candidate (not accessible in the system)
%%candidate.UserDefinedFields%% User defined fields values
%%candidate.Remarks%% Remarks
%%candidate.PreferredLanguage%% Preferred language of the candidate (not accessible in the system)
%%candidate.DateOfLastTest%% Date of the last test taken. This is not necessarily the date of the test you are working with in your editor.
%%candidate.CompanyID%% The company ID the candidate is registered with
%%candidate.ManagedByUserID%% The user id of the consultant that created this person
%%candidate.PluginData%% Any data stored by additional ITR plugins
%%candidate.Active%% If False this candidate is archived
%%candidate.BirthDate%% The Birthdate of the candidate in Javascript internal format. Use %%convertDateToITR(instanceObj.candidate.BirthDate)%% to show this in the users preferred date format.
%%candidate.Sex%% The Sex of the person. 0 = unknown or gender neutral, 1 = Male, 2 = Female. Use %%instanceObj.candidate.Sex == 0 ? "N/A" : instanceObj.candidate.Sex == 1 ? "Male" : "Female"%% to convert this to a readable format in your report.
%%candidate.Password%% The password of the person. Always empty.
%%session.ID%% The internal ID of the session (a GUID)
%%session.GroupSessionID%% If this session belongs to a group session or 360 degrees session this is the id of that sesison (not accessible in the system)
%%session.GroupID%% The id of the group this session is assigned to (not accessible in the system)
%%session.PersonID%% The id of the person this session is assigned to (not accessible in the system)
%%session.SessionType%% The type of the session
%%session.Description%% The session description
%%session.Goal%% The goal of the session (not accessible in the system)
%%session.UsedBatteryIDs%% Any battery ids used to build up this session
%%session.UserDefinedFields%% User defined fields values
%%session.Remarks%% Any remarks
%%session.AllowedStartDateTime%% Allowed start date & time for this session
%%session.AllowedEndDateTime%% Allowed end date & time for this session
%%session.StartedAt%% Actual start date & time
%%session.EndedAt%% Actual end date & time
%%session.Status%% Status of the session : 10 ready, 20 in progress, 30 done, 31 done & billed & post processed
%%session.SessionState%% State in tekst
%%session.Active%% If False this session is archived
%%session.EMailNotificationAdresses%% Any notification adresses email to inform when this session has ended
%%session.EnforceSessionEndDateTime%% The session end date & time that will be enforced.
%%session.ManagedByUserID%% The user id of the consultant that created this session
%%session.EmailNotificationIncludeResults%% Not supported anymore due to GDPR violations
%%session.PluginData%% Any data stored by additional ITR plugins
%%test.ID%% The ID of the test
%%test.TestName%% The name of the test
%%test.Description%% The description of the test
%%test.Explanation%% The explanation (in HTML) for this test
%%test.Copyrights%% Copyright information
%%test.Costs%% Costs in ticks for this test
%%test.TestType%% Type of test. 0 = person test, 10 = group test, 20 = 360 degrees test.
%%test.AuthorInfo%% Author info for this test
%%test.InvoiceCode%% The invoice code for this test
%%test.Remarks%% Remarks
%%test.TestStartDate%% The first date this test can be used
%%test.TestEndDate%% The last date this test can be used
%%test.TestDefinitionFrozen%% Not supported at this moment
%%test.TestDefinitionIsReleased%% Not supported at this moment
%%test.Active%% If False the test is archived
%%test.SupportsTestTaking%% Not supported at this moment
%%test.SupportsTestScoring%% Not supported at this moment
%%test.SupportsOnlyRenorming%% Not supported at this moment
%%test.IsRestartable%% Not supported at this moment
%%test.Supports360Degrees%% Not supported at this moment
%%test.CandidateCanDo360Too%% Not supported at this moment
%%test.ShowTestClosureScreen%% True if the test closure screen is shown
%%test.TotalTimeAvailableForThisTest%% Not supported at this moment
%%test.MinPercentageOfAnswersRequired%% Not supported at this moment
%%test.TotalNumberOfExperiments%% Not supported at this moment
%%test.LanguageSupport%% The language the test is in
%%test.Generation%% The generation (or version number) of the test
%%test.RequiredParsPerson%% Not supported at this moment
%%test.RequiredParsSession%% Not supported at this moment
%%test.RequiredParsGroup%% Not supported at this moment
%%test.RequiredParsOrganisation%% Not supported at this moment
%%test.ScoringScript%% The scoring script for this test
%%test.screens%% The array of screens this test contains
%%test.scales%% The array of scales this test contains
%%test.norms%% The array of norms this test supports
%%test.documents%% The array of documents that this test uses
%%test.scoreRules%% The array of visual score rules
%%test.graphs%% Not supported at this moment
%%test.PluginData%% Any data stored by additional ITR plugins
%%test.CatalogInformation%% Any information catalog to build up this test
%%test.BeforeScript%% Not supported at this moment
%%test.AfterScript%% Not supported at this moment
%%test.BeforeNormingScript%% The script run before norming
%%test.AfterNormingScript%% Not supported at this moment
%%test.Pre360%% Not supported at this moment
%%test.Per360%% Not supported at this moment
%%test.Post360%% Not supported at this moment
%%test.getTotalScreens()%% Get the total number of screens in this test
%%test.getTotalVisibleScreens()%% Get the total number of visible screens in this test
%%test.getScalesList()%% Get the list of scales in this test (csv format)
%%test.getNormsList()%% Get the list of norms in this test (csv format)
%%test.getScaleVarsList()%% Get the list of scales in this test (csv format)
%%test.getNormVarsList()%% Get the list of norm variable names in this test (csv format)
%%test.getScalesMinScore()%% Get the min scores possible on all scales
%%test.getScalesMaxScore()%% Get the max scores possible on all scales
%%sessiontest.ID%% The sessiontest id
%%sessiontest.SessionID%% The id of the session
%%sessiontest.TestID%% The id of the test
%%sessiontest.PersID%% The id of the person
%%sessiontest.Sequence%% The sequence this session test is presented in to the user (in case of multiple tests)
%%sessiontest.NormID1%% The id of the first norm (if set)
%%sessiontest.NormID2%% The id of the 2nd norm (if set)
%%sessiontest.NormID3%% The id of the 3rd norm (if set)
%%sessiontest.TestStart%% The start date & time of the test
%%sessiontest.TestEnd%% The end date & time of the test
%%sessiontest.HowTheTestIsTaken%% Not supported at this moment
%%sessiontest.PercentageOfQuestionsAnswered%% Not supported at this moment
%%sessiontest.TotalTestTime%% Not supported at this moment
%%sessiontest.Status%% The test status. 10 = ready, 20 = in progress, 30 = done
%%sessiontest.CurrentPage%% The current page the test taking is at at the moment
%%sessiontest.TotalPages%% The total number of pages
%%sessiontest.PluginData%% Any data stored by additional ITR plugins
%%sessiontest.Results%% The test results
%%sessiontest.Scores%% The test scores
%%sessiontest.TestLanguage%% The language of the test
%%sessiontest.getScaleScores()%% A csv list of scale scores
%%sessiontest.getNormScores()%% A csv list of norm scores
%%sessiontest.getNormScores2()%% A csv list of norm scores for the 2nd norm
%%sessiontest.getNormScores3()%% A csv list of norm scores for the 3rd norm
%%sessiontest.getNormPercentileScores()%% A csv list of percentile scores
%%sessiontest.getNormPercentileScores2()%% A csv list of percentile scores for the 2nd norm
%%sessiontest.getNormPercentileScores3()%% A csv list of percentile scores for the 3rd norm
%%sessiontest.getMaxNormScore()%% Get the max norm score for this norm
%%sessiontest.getMaxNormScore2()%% Get the max norm score for this norm
%%sessiontest.getMaxNormScore3()%% Get the max norm score for this norm
%%ID%% The ID of the report
%%Description%% The description of the rport
%%Explanation%% Explanation of the report
%%InvoiceCode%% Invoice code for this report (Not supported yet)
%%CostsInTicks%% Costs for this report (Not supported yet)
%%ReportType%% Type of the report. 0 = test report, 10 = session report (spanning accross multiple tests), 20 = group report, 30 = 360 degrees group report
%%Remarks%% Remarks for this report
%%ReportLanguage%% Language for this report
%%Active%% True if the report can be used
%%DefaultReport%% True if this is the default report for this test (not supported yet)
%%PluginData%% Any data stored by additional ITR plugins
%%BeforeReportScript%% The script run before generating the report
%%AfterReportScript%% Not supported yet
%%PerCandidateReportScript%% Not supported yet
%%ReportGraphs%% The array of graphs supported by this report
%%TestID%% The test ID this report is for
%%TestIDs%% Not supported yet
%%ReportText%% The text of the report, including placeholder values (with %%)
%%Generation%% The generation (or version number) of the report