Error in generating Event Report for any data element linked with the Option set

I am having a problem generating an event report that includes any data element connected to an Option set for any Program stage. The event report keeps running (as shown in the image).

But a report can only be generated by placing the data element in Layout within the Report filter section (as shown in the image), and The options within the table show their codes, but their names do not appear.

Thank you for your post @jamal_aljadan! Please share the dhis2 version number so we can try to reproduce this? I want to reproduce this issue in any of the instances to verify if it’s a bug or not.

If it’s a bug then we will create a Jira bug issue. Thanks!

Hello, I had a similar problem in the past

Hope this will helps.

1 Like

@Gassim @didate Thanks for your help.
@Gassim We use version 2.38.2
@didate but how do I re-create the options set manually and there is stored data using this options set??

1 Like

Dear team, I am managing several tracker instances. After upgrading them to I am facing a challenge on generating report using an Event Report.
I wanted to report this on Jira, but for some reasons. I couldn’t log in. @Gassim or anyone around, I will appreciate if you can test from your side, and if it is bug please help me to post to JIRA. This is very important for any one using version and

The challenge can be replicated on Demo sites (DHIS 2 Demo - Sierra Leone and also DHIS 2 Demo - Sierra Leone)

  1. Open “Event report App” and table style “Pivot”
  2. Select Program (Malaria Focus Investigation),
  3. Program stage: “Foci response” and Data element : “Follow-up diagnosis action”
  4. Period : Last five years
  5. Update

  1. The database just keep rotating, the error message from the console is: “Uncaught TypeError: Cannot read properties of undefined (reading ‘code’)

If you repeat the same, but this time set a table style “Line listing”. the database just keep rotating but with different error (See image below). “Response.js:335 Uncaught TypeError: Cannot read properties of undefined (reading 'getCachedOptionName’)”


1 Like

It is important to note that not all data elements or attributes linked with option set don’t work. Some data elements and attributes linked with optionset works even though the configuration is the same

1 Like

Hello @sele ,
Thank you for your share on this Problem. I am facing this same problem but I am using version 2.38.2

We hope that the problem will be resolved as soon as possible.

1 Like

@sele @jamal_aljadan, thank you!

The steps to reproduce with the version numbers helped, thanks! I was able to reproduce the issue and clearing the cache using both the Data administrator app as well as the Browser Cache Cleaner app didn’t solve the issue either. Here’s the Jira ticket ([DHIS2-14454] - Jira)

Triaging this post for follow up. Thank you!


I recently upgraded my instance from 2.35 to 2.39

I have a program with a few data elements and attributes based on option sets. I can view the line list in event reports but when l change from line list to aggregate data the results does not even show… the system gets stuck. I checked the developers console and I am seeing Response.js:206 Uncaught TypeError: Cannot read properties of undefined (reading ‘code’)
at Response.js:206:42
at ()
at Response.js:205:1
at Array.forEach ()
at Response.js:202:10
at new Response (Response.js:218:6)
at Object. (InstanceManager.js:48:32)
at i (jquery.min.js:2:28017)
at Object.fireWith [as resolveWith] (jquery.min.js:2:28783)
at A (jquery.min.js:4:14017)

Hello @tawanda ,

This issue is being followed by the developer team and has been brought to Jira.
Here’s the Jira ticket ([DHIS2-14454] - Jira )

1 Like