Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Docx English indentation problems when using Report Text Tool and Visual Layout Tool

EG_GBM
7 - Meteor

I want to generate a standard format doc document, but I encountered a random English indentation error when using Report Text tool and Visual Layout tool.

 

Sometimes the English format of the generated doc document are completely correct, but sometimes with English indentation errors, please refer to the figure below pictures.

 

Attached my workflow. Any help, so much thankful!

EG_GBM_3-1675081206837.png

 

EG_GBM_4-1675081240281.png

EG_GBM_5-1675081262845.png

 

9 REPLIES 9
caltang
17 - Castor
17 - Castor

Perhaps you can give us some more raw data? 

 

The macro is not needed, just the visual tool will do. 

 

Based on what you have provided, it appears that your issue is mostly to do with the length of characters that appear before the job name. Perhaps you can start a new line for the sentence beginning with "Now the employee...".

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
EG_GBM
7 - Meteor

Amazing, start a new line for the sentence beginning with "Now the employee..." can solve the problem, but they are not allowed. I've updated my workflow and looking forward to your suggestions. Thanks for your help!

caltang
17 - Castor
17 - Castor

Hi @EG_GBM,

 

I understand that you have constraints with the format, but I have tried with the following file render formats:

  1. PDFs
  2. Word 2007

Both methods had issues.

 

Firstly, PDFs can be perfect for the Chinese and English paragraphs, but it will cause the footer to sway off centre for both English & Chinese.

 

Secondly, Word 2007 will have the issue mentioned with your English paragraph due to the length of text before those sentences. For example, Report ID 1 and 2 have users with different names and different employee IDs, one of which is long and the other short. This causes a paragraph issue, thereby forcing some text to a new line, and cramp up the space between words.

 

Try changing it here:

caltang_0-1675172903972.png

 

To make your life easier, I would suggest making some adjustments to the English translations so that they can better sync with the lengths presented earlier in Chinese.

 

In addition, I would also recommend for you to put a dynamic footer using Trial 2 (attached). This allows the footer to always be anchored to the bottom of the page regardless of length of text in the paragraphs above. But the problem with doing so is that you will have both English and Chinese characters sway away from the centre of the footer.

 

I would suggest to do something like this:

 

大风车(上海)光影科技有限公司 - 中国上海
DFC (Shanghai) Lithography Science Facilities and Technology Co., Ltd - Zhangjiang District, Shanghai. China

 

You will need to employ some flexibility, else your reports will have trade offs one way or another.

 

I hope this gives you some ideas.

 

 

Best regards,

Cal

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
EG_GBM
7 - Meteor
Your explanation opened my eyes and took my breath away, thank you for your help!
caltang
17 - Castor
17 - Castor

没问题! Happy to help!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
EG_GBM
7 - Meteor

Unfortunately, after testing data, I found the problem was not solved, I provide more data in the workflow.

caltang
17 - Castor
17 - Castor

Hi @EG_GBM,

 

Maybe you can draw up a template on Microsoft Word and show us here?

 

I'll try to design it to the way you want. It will be helpful as well if you could provide the assets like corporate images and so on.

 

Do let me know if I can take liberty with the design.

 

 

Best,

Cal

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
EG_GBM
7 - Meteor

In fact, what I really need is to create PDF certificate, but in Alteryx Chinese part will be garbled, so I use the method of converting word to PDF. I provide docx example and more data now, I'm looking forward to knowing how you can solve this problem. Thanks a lot!

caltang
17 - Castor
17 - Castor

Hi @EG_GBM !

 

After much research, I know why you have that issue now. 

 

But first, to solve your issue, refer to my workflow and use a render tool that has these properties:

 

caltang_0-1676380179762.png

 

Using the Certificate Workflow I made for you, your report should be fine now. 

 

The issue exist because in your Report Text tool, you are using different FONTS:

 

caltang_1-1676380284203.png

 

The Chinese font is called SimSun whereas your English font is called Calibri. 

 

Because these two fonts are different, Alteryx will read them with some degree of issue because one is for Hanzi (汉字) whereas the other is for Latin (拉丁字母). 

 

To solve your footer issue, I tried using SimSun and Calibri for Chinese and English respectively:

 

caltang_2-1676380450636.png

 

The results:

caltang_3-1676380507069.png

 

Voila! It will always be in the centre. 

 

So to make your life easier, whenever you are typing in Chinese, use SimSun. Whenever you are typing in English, use Calibri. You can use a random Word document to write like this:

caltang_4-1676380655743.png

 

When you write, make sure the text you see on Report Text tool is following the right font. It is easy to spot.

 

You can then design your report in any way you want!

 

我希望这对你有帮助!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels