Title of Data Set Report not appear (Arabic text doesn't show in PDF download) [FIXED]

Hello colleagues,

I attempted to download the report dataset as an XLS file, but unfortunately, the title is displaying as “ span> strong>”. Could someone please assist me in resolving this issue? Your prompt attention to this matter would be greatly appreciated.

Thank you.

Hi @sami.oracle10g

Is the dataset using a custom design? If yes then please use basic HTML for the report to appear properly. For example, instead of <strong> use <b> and if this change removes “strong” from the report, keep on modifying the template until it appears properly.

Hope it works! Please feel free to post with an update on how it goes.

Thanks!

Dear @Gassim,

I didn’t start with your suggested solution because new problems have appeared. When I tried to download it, there was a message that appeared saying, “datasetReport.json couldn’t download - something went wrong. Please try again or contact your organization.”

Best regards,

@Gassim
In addition, I have tried to apply your solution, but unfortunately, it was unsuccessful. Please see the attached photo.
NB: I replaced all “strong” words with “b”. Is it right or you meant something different?

1 Like

Apologies for the delay. Would you please share the HTML code so we might find out if there’s something breaking it?

Thank you! :slight_smile:

An error occurred: Body is limited to 32000 characters; you entered 62091.

Please give me your email to send it or any appropriate method you prefer.

Alright, thanks! Please send it as PM here

sent please check it.

1 Like

Thanks! I am able to reproduce the issue by adding Arabic text to a simple table without any additional HTML. Just changing an English text to Arabic in a table that prints as PDF well when the text in English, but the Arabic text doesn’t appear:

Would you like to create a jira bug issue in Projects - Jira using your account with steps to reproduce the issue?

The code for the table above is:

<table align="left" border="1" cellpadding="1" cellspacing="1" dir="rtl" lang="ar" style="width:500px;" summary="Summary">
	<caption>Caption</caption>
	<thead>
		<tr>
			<th scope="row">Heading</th>
			<th scope="col">Heading</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<th lang="ar" scope="row">متوقع</th>
			<td><input id="h0xKKjijTdI-HllvX50cXC0-val" name="entryfield" title="Expected pregnancies" value="[ Expected pregnancies ]" /></td>
		</tr>
		<tr>
			<th lang="ar" scope="row">نسبة</th>
			<td><input id="vg6pdjObxsm-HllvX50cXC0-val" name="entryfield" title="Population of women of child bearing age (WRA)" value="[ Population of women of child bearing age (WRA) ]" /></td>
		</tr>
		<tr>
			<th lang="ar" scope="row">اجمالي</th>
			<td><input id="WUg3MYWQ7pt-HllvX50cXC0-val" name="entryfield" title="Total Population" value="[ Total Population ]" /></td>
		</tr>
		<tr>
			<th lang="ar" scope="row">اجمالي اقل من سنة</th>
			<td><input id="DTVRnCGamkV-HllvX50cXC0-val" name="entryfield" title="Total population &lt; 1 year" value="[ Total population &lt; 1 year ]" /></td>
		</tr>
		<tr>
			<th lang="ar" scope="row">اجمالي اقل من خمس سنين</th>
			<td><input id="DTtCy7Nx5jH-HllvX50cXC0-val" name="entryfield" title="Total population &lt; 5 years" value="[ Total population &lt; 5 years ]" /></td>
		</tr>
	</tbody>
</table>

You can see I was trying to add lang="ar" but that didn’t work either.

If you create the bug issue, please share it here so it’s easily found by other community members.

Thanks!

2 Likes

I create issue in Jira its I’d is DHIS2-15407

https://dhis2.atlassian.net/browse/DHIS2-15407

1 Like

@Gassim
Thanks for your support. I have made some progress in solving this issue. as the Excel downloaded well. and a new problem appeared as I have titles in the first three rows, but when downloading the Excel file, it appears only the titles in the first row. Below, I have attached the code, a screenshot of generated report, and the Excel file.
source code:
New Microsoft Word Document.docx (15.7 KB)
dataSetReport (20).xls (6 KB)
attached.
Screenshot of genexcel file downloadederate report:

@sami.oracle10g

Thanks for the info! I was reviewing this topic post recently and it appeared that (based on your screenshots) the issue was on the PDF files and not the spreadsheets. I also tried to reproduce the previous issues in spreadsheet but the issue was consistent only in PDF files.

I’m sorry to see that new issues came up. If this is a new issue with spreadsheets, it might be a better idea to create a new topic and follow from there, if you agree that it’s a new issue then I will move the posts.

I’m trying to sort things out please. Could you explain step by step where the issue is? The way I understood it is that you created a custom HTML form which has a number of titles and then when generating the report, the titles are missing? The screenshot is from the dataset or from the xls file after downloading from the reports app?

Thanks!

The screenshot is not PDF it’s from system directly report App.

Hi @sami.oracle10g

Regarding the issue that Arabic text didn’t show in PDF download, please see the jira issue as it has been fixed ([DHIS2-15407] - Jira)

Quoting @lina:

Verified that the Arabic text is now displayed in 41dev, 40dev, 39dev, and 38dev. Database language setting for the user has to be set to Arabic.

When it comes to formatting - as Viet mentioned below we should take a look case by case basis.

@Sami Hazzaa In case you face this issue in the future, feel free to create a new ticket with steps to reproduce on play environments (for formatting issues as Viet mentioned, or if you have issues with your Excel). We’re trying to break down issues into small chunks. This one was about the Arabic not displaying in PDF.

The fix should be available in the next stable releases so make sure to update when they are released. If the issue where Arabic text didn’t appear is now resolved for you, for the other issues please create a new topic with steps to reproduce (one issue per topic please).

Thank you! Looking forward to hearing an update from you.