Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with exporting blank textbox to excel for number with 10 decimals

Status
Not open for further replies.

varadha72

Programmer
Oct 14, 2010
82
US
Hi,

Can someone help me here.

My report layout is DB field with some textboxes. The report needs to be exported to Excel format. In excel where the blank textboxes are, the user must be able to key in a 10 decimal value data. So I inserted a textbox in the detail section next to the Name field. I am able to export to excel. But when I key in numbers, I am able to key in upto 9-decimal places, the moment I key the 10 decimal and I see only 9 appearing. Not sure why.

On a separate note, I excel, in a new sheet when I tried to key in 10 decimal value I have no issues. So no problem with excel, probably with export of blank textbox.

Please someone help me understand how I could use a blank field in the report to populate a 10-decimal data after export.
 
Hi,

Here's what I've done with reports generated in systems other than Excel.

EXPORT the report in COMMA or TAB delemietd structure. This is usually performed via a schedule.

From Excel, IMPORT the text file into a PRE-EXISTING workbook, with a formatted QueryTable (simply a REFRESH that can be executed automatically) on a sheet that contains all the bells and whistles (controls).

FYI, I'm an Excel guy.
 
Hi SkipVought,

Thanks for your reply, but the problem here is I need formatting for each of these fields. i.e. I have to show single line when there is change in name, and if the name is same in subsequent rows, then I need to show dotted lines. So if I export to CSV or tab delimited, I loose the formatting. so please suggest work around, if any, i.e. how I could force Crystal and Excel to display 10 decimal data.
 
I need formatting for each of these fields"

You would be IMPORTING into a per-existing, FORMATTED sheet, in accordance with your specifications.

"I have to show single line when there is change in name, and if the name is same in subsequent rows, then I need to show dotted lines."

Please post an example of such. Although it seems like a Conditional Format might work to have the row lower border dotted unless the Name changes, in which case a SOLID border.
 
Header: Name......Class....CUSIP.....Income.........Dividend......
Detail: Name......Class....CUSIP.....Blankfield1....blankfield2...

Formatting-
TOP:
if (Count ({F.short_name}, {F.short_name}))=1 then crSingleLIne
else
if (Count ({F.short_name}, {F.short_name}))=2 then
(if {#RTotal0}=1 then crSingleline else crDottedLIne)
else
if (Count ({F.short_name}, {F.short_name}))>=2 then
(if {#RTotal0}=1 then crSingleline else
crdottedline);

BOTTOM:
if (Count ({F.short_name}, {F.short_name}))=1 then crSingleLIne
else
if (Count ({F.short_name}, {F.short_name}))=2 then
(if {#RTotal1}=1 then crdottedline else crsingleLine)
else
if {#RTotal1}=1 then crdottedline else
if {#RTotal1}=maxcount then cRSINGLEline else crdottedline;

So these formattings are working good while export, I am having trouble displaying 10-12 digit value which is having 10 decimals.
 
What? In a Textbox or in a cell? If the latter, format as "#.0000000000" for 10 decimal places.
 
...and in addition, is this a number to be used numerically, in some arithmetic operation? If not what?
 
What I meant by my previous statement is that, the formatting are working good.
All that I am having trouble is only with the blankfield1 and 2.
They are blank textboxes. The blankfield1 and blankfield2 are just textboxes spaced enough to hold 12 characters. After export I need to see the data as 1.0000000001 (10 decimals). What I mean by to see data is, the user would key in this value 1.0000000001 in the excel spreadsheet. Before keying in, its a blank field.
 
The user would key in the Worksheet after exporting from Crystal Reports as Excel.
 
I do have the formatting. The formatting is present in the worksheet after being exported from crystal reports. The formatting include top and bottom lines.
 
But theres no formatting for the 'numbers'.

And you never answered my question regarding these 'numbers!'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top