Template Builder

Life Builders,

Can Someone please help to figure out what went wrong with my Term 3 Template builder the HEADER and the FOOTER could not accept drag and drop template?. Also, Term 1 and 2 do not accept attendance on HEADER what am I getting wrong?

Urgent assistants will be highly appreciated.

Best regards
Francis

Comments

  • Hi Francis,

    It's hard to tell what the issue might be from your description. Can you share some screenshots of your template builder page, and if you can, also share some steps to reproduce the issue?

    Thanks!
  • Noble Educator,
    Thank you for the attention here are the screenshots
  • Hi Francis,

    Looks like you've setup some custom report templates. In each of these, there should be a section at the top defining some of the settings for each template. Be sure under Types: that it says Body,Header,Footer to allow the template to be used in any of these locations, then in Manage Assets use the "Scan Asset Directories" option to load these changes.



    Hope this helps!
  • Dependable Educator,

    We shall ever be grateful to you or all your time and intellectuals offered for free to educate those who aspired to be enlightened in the world, heaven shall reward your labour of love.
    On the Issue of the Template Builder, are there limits to the number of the Template that can be generated under Template Builder? or what are we doing wrong that can result in the header, body, and footer rejecting drag and drop duplicate custom on the Template?

    Please can someone enlighten me on why my student data duplicates any time my result is been generated?
    and also the variable names to call data from the write report.
    Below is the sample of the errors
  • Hi Francis,

    For the header/footer/body, in the top of the template, be sure under Types: that it says Body,Header,Footer to allow the template to be used in any of these locations, then in Manage Assets use the "Scan Asset Directories" option to load these changes. Feel free to share an example of the template file if it still isn't working.

    You've shared some screenshots of custom templates, which it's difficult to suggest the cause of duplication without seeing the code. Are you able to share a snippet of the template?

    The variable names to use depend on the data you're trying to insert. There are different sets of data, called Data Sources, which determine the data available to a template. These can be found in the modules/Reports/src/Sources folder.

    The templates include those data sources through the configuration at the top of the file, in yaml format. An example from the attendance template is:
    sources:
        student: Student
        attendance: AttendanceByCycle
        reportingCycle: ReportingCycle
    Checking the existing templates may offer some good examples of how to use these data sources and variables in your template.
  • Hi Sandra,

    Thank you for your time, I attached here the Template code for Term 2, Please what are we doing wrong here that bring about a duplicate of student data.

    Your assistant will be highly appreciated

    Best regards,
    Francis
  • edited November 2020
    Hi Francis,

    The course information is inside a loop {% for course in courseCriteria %}, perhaps this is where you are seeing duplicate data?

    If you go to Report Settings, there is a Debug Mode that may be handy to turn on. This will help you see what data is available for your report templates. You will see this as a magnifying glass option called Inspect when you go into the Generate Reports page and view the list of student reports to generate. This will show you the names of the variables and their values.





    In the above example, the student variables can be accessed with the format student.variableName, eg {{ student.officialName }}

    To add more data and variables to the list, be sure to add data sources to the top of the template definition, then Scan Assets again to update the templates based on these changes. Here's an example of some common data sources:
    sources:
        student: Student
        attendance: AttendanceByCycle
        reportingCycle: ReportingCycle
        courseCriteria: CourseCriteria
    
    Hope this helps!
  • Enviable Educators,
    I'm humbled, by you all the time ready to support, am grateful for your advice, we shall effect the and get back

    Always grateful for the support

    Best regards
    Francis



  • Just saw this post so I'm assuming maybe its the same issue
Sign In or Register to comment.