- Posts: 1
Report generation (WRITE Fixed Width) format problems/suggested improvements
- Alan Frostick
- Topic Author
- Offline
- User
Less
More
3 years 9 months ago - 3 years 9 months ago #3606
by Alan Frostick
Report generation (WRITE Fixed Width) format problems/suggested improvements was created by Alan Frostick
My experiment was taking data from a MySQL database on the READ side and TextFile Adapter on the WRITE side with Fixed Width in the General tab to create a report of fields in the database.
1. All widths in the TextFile Adapter are assigned a default of 10, regardless of the transcribed MySQL field sizes from "Automatically connect fields". This can be adjusted by hand and is OK for most Decimal fields, but the Date (and more so the DateTime) formats are already over 10 and that could be better.
2. All field types (including numeric Decimal, Integer) are given Text Alignment=Left. Again, these can be adjusted manually, but for numeric data types it is better Right aligned by default and Date fields are generally best Center aligned by default.
3. A new option in the Adapter is needed to pad fixed width columns with an extra space. This is especially problematic when a Left aligned String column follows a Right aligned Decimal column. It is tricky to stop the columns being adjoined, but I found a workaround with SPACE as a delimiter (under Delimiter tab, User Defined (space and space) with options checked for Only apply to String and Also use for Column Headings, but with the Option unchecked Automatically mask...in Field Content.
1. All widths in the TextFile Adapter are assigned a default of 10, regardless of the transcribed MySQL field sizes from "Automatically connect fields". This can be adjusted by hand and is OK for most Decimal fields, but the Date (and more so the DateTime) formats are already over 10 and that could be better.
2. All field types (including numeric Decimal, Integer) are given Text Alignment=Left. Again, these can be adjusted manually, but for numeric data types it is better Right aligned by default and Date fields are generally best Center aligned by default.
3. A new option in the Adapter is needed to pad fixed width columns with an extra space. This is especially problematic when a Left aligned String column follows a Right aligned Decimal column. It is tricky to stop the columns being adjoined, but I found a workaround with SPACE as a delimiter (under Delimiter tab, User Defined (space and space) with options checked for Only apply to String and Also use for Column Headings, but with the Option unchecked Automatically mask...in Field Content.
Last edit: 3 years 9 months ago by Alan Frostick.
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
3 years 9 months ago #3607
by FlowHeater-Team
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Replied by FlowHeater-Team on topic Report generation (WRITE Fixed Width) format problems/suggested improvements
Hi Alan,
Thank you very much for your suggestions. I´ll put the improvements onto our TextFile Adapter feature list. In further versions of FlowHeater we´ll try to implement this features. Thanks again.
Thank you very much for your suggestions. I´ll put the improvements onto our TextFile Adapter feature list. In further versions of FlowHeater we´ll try to implement this features. Thanks again.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.
Time to create page: 0.248 seconds