What I've learned about Generic Text Printers:
In the process of creating an HTML report from A5 I learned a lot about using the Generic Text printer for reports. Here's a summary of what I learned - hope it helps make the job easier for others.
(This isn't code but this area seemed more appropriate than the "Alpha Software General Announcements" area which sounds more like it should come from Alpha instead of users.)
1. Set the grid for "snap to" with a size of 0.167 inches. Since a generic text sheet is 6 lines per inch, this will make each line the correct height.
(This creates a small problem with the cursor but I feel it is offset by the reduction of mistakes caused by incorrect field sizes. The problem is that the single, flashing cursor will not show up in a field box of this size. You can still highlight one or more characters and see the highlighting or you can make the box taller while editing it.)
2. I'm not sure it's necessary but it seemed to be helpful to double space when creating HTML reports.(See item 7. Double spacing may have been a temporary solution to that problem. I've used some single spacing recently with no problems.)
3. Set all fonts to Courier 12. This is the size that will be printed so it will help you make sure there is enough space in the field so that all letters will be printed. (This is especially important if you are trying to create an HTML report because a missing letter in an HTML command will ruin the output completely.)
4. Use only plain field boxes and text boxes. The field box can contain a memo field.
5. DO NOT use RTF fields and DO NOT use field borders or underlined fonts. Also, do not use check boxes or any type of graphics - they won't print but they could cause trouble with the rest of the printout.
6. Set all fields and text boxes to Left aligned (default) when creating HTML reports. In this case, alignment is not important to the output and it sometimes seemed to cause trouble when right alignment was used. For other reports, the use of Right or Center alignment may be a necessity.
7. IMPORTANT: This one took me a long time to discover... I found out that the fields and text boxes must be set up so that the tab sequence moves you through them as though you were reading a book (ie, left to right and top to bottom). When the tab sequence is not correct, some lines may be printed out of sequence. (Weird but true!) Unfortunately, you cannot re-sequence them in reports as easily as you can in forms. If your tab sequence is not correct, you will have to either move them and change the text in each appropriately or cut and paste the field/text boxes for each section of the report. I've experimented with the cut and paste method and sometimes it seems to fix the problem even if you cut and paste the whole section to a new report - other times it doesn't so you'll have to experiment unless someone else can figure out the logic and post it here.
In the process of creating an HTML report from A5 I learned a lot about using the Generic Text printer for reports. Here's a summary of what I learned - hope it helps make the job easier for others.
(This isn't code but this area seemed more appropriate than the "Alpha Software General Announcements" area which sounds more like it should come from Alpha instead of users.)
1. Set the grid for "snap to" with a size of 0.167 inches. Since a generic text sheet is 6 lines per inch, this will make each line the correct height.
(This creates a small problem with the cursor but I feel it is offset by the reduction of mistakes caused by incorrect field sizes. The problem is that the single, flashing cursor will not show up in a field box of this size. You can still highlight one or more characters and see the highlighting or you can make the box taller while editing it.)
2. I'm not sure it's necessary but it seemed to be helpful to double space when creating HTML reports.(See item 7. Double spacing may have been a temporary solution to that problem. I've used some single spacing recently with no problems.)
3. Set all fonts to Courier 12. This is the size that will be printed so it will help you make sure there is enough space in the field so that all letters will be printed. (This is especially important if you are trying to create an HTML report because a missing letter in an HTML command will ruin the output completely.)
4. Use only plain field boxes and text boxes. The field box can contain a memo field.
5. DO NOT use RTF fields and DO NOT use field borders or underlined fonts. Also, do not use check boxes or any type of graphics - they won't print but they could cause trouble with the rest of the printout.
6. Set all fields and text boxes to Left aligned (default) when creating HTML reports. In this case, alignment is not important to the output and it sometimes seemed to cause trouble when right alignment was used. For other reports, the use of Right or Center alignment may be a necessity.
7. IMPORTANT: This one took me a long time to discover... I found out that the fields and text boxes must be set up so that the tab sequence moves you through them as though you were reading a book (ie, left to right and top to bottom). When the tab sequence is not correct, some lines may be printed out of sequence. (Weird but true!) Unfortunately, you cannot re-sequence them in reports as easily as you can in forms. If your tab sequence is not correct, you will have to either move them and change the text in each appropriately or cut and paste the field/text boxes for each section of the report. I've experimented with the cut and paste method and sometimes it seems to fix the problem even if you cut and paste the whole section to a new report - other times it doesn't so you'll have to experiment unless someone else can figure out the logic and post it here.
Comment