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!
Solved! Go to Solution.
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...".
Hi @EG_GBM,
I understand that you have constraints with the format, but I have tried with the following file render formats:
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:
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
没问题! Happy to help!
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
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:
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:
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:
The results:
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:
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!
我希望这对你有帮助!