Problem with StiText component when TextFormat set to Number (16 digits)
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Problem with StiText component when TextFormat set to Number (16 digits)
Hello,
The StiText exists inside a databand and bound to a string data column in a dataset.
The string data column contains credit card numbers which is 16 digits long.
The problem:
When setting the TextFormat of StiText to "Number", the data displayed in the report are not correct only for the said stiText. It is showing the same credit card number for all the datatable rows. After investigation, we discovered that when the string length is above 15 digits and the TextFormat is set to Number, this issue appears.
It is important to mention that the data are displayed correctly when the TextFormat is set to general.
Thank you in advance for your kind cooperation.
The StiText exists inside a databand and bound to a string data column in a dataset.
The string data column contains credit card numbers which is 16 digits long.
The problem:
When setting the TextFormat of StiText to "Number", the data displayed in the report are not correct only for the said stiText. It is showing the same credit card number for all the datatable rows. After investigation, we discovered that when the string length is above 15 digits and the TextFormat is set to Number, this issue appears.
It is important to mention that the data are displayed correctly when the TextFormat is set to general.
Thank you in advance for your kind cooperation.
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Problem with StiText component when TextFormat set to Number (16 digits)
It is important to mention that this issue appears only when exporting to Excel.
StiReportResponse.ResponseAsXls(this, objReport);
Cheers ,,,
StiReportResponse.ResponseAsXls(this, objReport);
Cheers ,,,
Problem with StiText component when TextFormat set to Number (16 digits)
Hello,
This problem is not in the designer, Excel displays only 15 digits, the rest are discarded. This problem can be solved only exporting that value to the string format.
Thank you.
This problem is not in the designer, Excel displays only 15 digits, the rest are discarded. This problem can be solved only exporting that value to the string format.
Thank you.
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Problem with StiText component when TextFormat set to Number (16 digits)
Hi Aleksey,
Did you mean setting the TextFormat to General instead of Number?
If this is what you are recommending then the designated Excel Cell would have a small green tooltip, at the top-right corner of the Cell, informing us to convert the string value to numeric value. Unfortunately, this behavior is not acceptable by our customer.
Waiting for your highly appreciated opinion.
Thx
Did you mean setting the TextFormat to General instead of Number?
If this is what you are recommending then the designated Excel Cell would have a small green tooltip, at the top-right corner of the Cell, informing us to convert the string value to numeric value. Unfortunately, this behavior is not acceptable by our customer.
Waiting for your highly appreciated opinion.
Thx
Problem with StiText component when TextFormat set to Number (16 digits)
Hello,
When you type a number that contains more than 15 digits in a worksheet cell, Microsoft Office Excel changes any digits past the fifteenth place to zeros.
Please see the article "Display numbers as credit card numbers" on http://office.microsoft.com/en-us/excel ... 36840.aspx
Thank you.
When you type a number that contains more than 15 digits in a worksheet cell, Microsoft Office Excel changes any digits past the fifteenth place to zeros.
Please see the article "Display numbers as credit card numbers" on http://office.microsoft.com/en-us/excel ... 36840.aspx
Thank you.
-
- Posts: 33
- Joined: Fri Aug 20, 2010 3:46 am
- Location: Lebanon - Beirut
Problem with StiText component when TextFormat set to Number (16 digits)
Thank you for your prompt reply.
The best alternative is to split the credit number into
1234 1234 1234 1234 instead of 1234123412341234
So exporting the value as a string as you suggested
Best Regards,
The best alternative is to split the credit number into
1234 1234 1234 1234 instead of 1234123412341234
So exporting the value as a string as you suggested

Best Regards,
Problem with StiText component when TextFormat set to Number (16 digits)
Hello,
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
We are always glad to help you!
Let us know if you need any additional help.
Thank you.