If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Field Data format problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-11, 18:39
MatthewM MatthewM is offline
Registered User
 
Join Date: Mar 2007
Posts: 15
Field Data format problem

Hi all,

I have a frustrating issue I cannot work out. I am using Crystal Reports to develop reports from an excel spreadsheet.

The issue I am experiencing is that whilst specific columns are formatted as Number fields in excel, they come across as string fields in Crystal. The frustraing part is that occasionally when making a new connection to the spreadsheet the fields will come accross successfuly as number fields. However, they seem to be reverting upon a subsequent opening of the CR file holding the report.

I am also getting a mapping box appearing when I refresh the data. If I attempt to map the fields correctly they all revert to string fields.

If anyone could shed some light on this for me it would be appreciated, unfortunately I cannot post the file as it holds sensitive info

Last edited by MatthewM; 12-19-11 at 19:15. Reason: [Solved]
Reply With Quote
  #2 (permalink)  
Old 12-19-11, 19:16
MatthewM MatthewM is offline
Registered User
 
Join Date: Mar 2007
Posts: 15
I have solved this issue.

As it turns out Crystal determines the field type based on the first cell in each column, I don't think it even looks at how they have been assigned in excel. In this case the first cell is blank, despite it being a number field. I guess Crystal interprets that null value as a string.

I put 1's in the two troublesome columns and the file no longer asks for re-mapping and the fields remain as numbers after a refresh of the report. Luckily we do not report all the way back to the first row in the spreadsheet so the fake data won't be an issue.
Reply With Quote
  #3 (permalink)  
Old 12-26-11, 01:49
mission mission is offline
Registered User
 
Join Date: Oct 2010
Posts: 44
Good that you solved the issue.

Thanks for the knowledge sharing
Reply With Quote
Reply

Tags
[solved]

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On