CR 8.5.0.127
If you remember, I had a very annoying report I had to fight with. Long story short, they got fed up and rewrote the report but told me to fix the formatting. So I did. I came up with a solution for today and it works, but I want to know if anyone else has a solution. I am pulling data from an MS-SQL server on our network. The data comes in as parameters (from a program not SQL), strings, and numeric data. The numeric data can be pulled in a formatted correctly. The strings and parameter values sometimes cut the top of the field off. When you look at preview, you can see that the data is not displayed in the middle (vertically) of the field, but at the very top. Part of it, just a pixle or two, is on the border of the field. When it prints, it cuts the tops of the fields off. The data also doesn't lign up with the other fields. You can align the tops, middles, bottoms, but the data in the string fields will not line up to the numeric fields. I came up with a formula for converting the string fields in this report to numeric. They are numeric values stored in string fields. The program that stores them has a fixed width string that stores the numeric data like " 12" in a 7 char string field. This is the formula I came up with and it seems to correct the formatting:
FORMULA=cdbl(trim(IIF(IsNumeric(Trim({TABLE.FIELD})), {TABLE.FIELD}, "0"))) suppress on "0". The data will never be 0, The program that stores the data will either store a number greater than 0 or 10 spaces for a null value.
We use Courier New size 8 on our reports. Let me know if I need to give more information.
Anyone know of a better way of fixing this? I realize that this won't work with alpha or alpha-numeric string values and I know I will run into those soon.
There are 10 types of people in the world, those that understand binary, and those that don't.
If you remember, I had a very annoying report I had to fight with. Long story short, they got fed up and rewrote the report but told me to fix the formatting. So I did. I came up with a solution for today and it works, but I want to know if anyone else has a solution. I am pulling data from an MS-SQL server on our network. The data comes in as parameters (from a program not SQL), strings, and numeric data. The numeric data can be pulled in a formatted correctly. The strings and parameter values sometimes cut the top of the field off. When you look at preview, you can see that the data is not displayed in the middle (vertically) of the field, but at the very top. Part of it, just a pixle or two, is on the border of the field. When it prints, it cuts the tops of the fields off. The data also doesn't lign up with the other fields. You can align the tops, middles, bottoms, but the data in the string fields will not line up to the numeric fields. I came up with a formula for converting the string fields in this report to numeric. They are numeric values stored in string fields. The program that stores them has a fixed width string that stores the numeric data like " 12" in a 7 char string field. This is the formula I came up with and it seems to correct the formatting:
FORMULA=cdbl(trim(IIF(IsNumeric(Trim({TABLE.FIELD})), {TABLE.FIELD}, "0"))) suppress on "0". The data will never be 0, The program that stores the data will either store a number greater than 0 or 10 spaces for a null value.
We use Courier New size 8 on our reports. Let me know if I need to give more information.
Anyone know of a better way of fixing this? I realize that this won't work with alpha or alpha-numeric string values and I know I will run into those soon.
There are 10 types of people in the world, those that understand binary, and those that don't.