Skip to Content
0
Former Member
Jun 09, 2009 at 04:51 PM

Crystal u201CAccess/Excel (DAO)u201D Connection u2013 Data Type problems

21 Views

Hi,

Iu2019m trying to produce a Crystal Report (in v9 u2013 still our corporate standard) that reads a list of telephone numbers from a user produced file and then queries each telephone number against a database and reports the results. The report User must be able to specify their source file of telephone numbers.

Using an u201CAccess/Excel (DAO)u201D connection to a text file appears my only option for reading the user's Telephone Numbers file. The User will need to u201CDatabase / Set Data Source Locationu201D to the new Telephone Numbers file each time. (It would be nice to make the file location a report parameter , avoiding this, but I'm not aware Crystal can do that to specify a data source.)

Iu2019ve created the connection ok. Database Name = my Telephone Numbers file location. Database Type = Text.

Problem: The u201CAccess/Excel (DAO)u201D connection automatically interprets the Telephone Number data as data type NUMBER u2013 and then strips leading zeroes off each telephone number as it reads the data in! Clearly that's not good for matching the number up.

Is there any way to make Crystal accept the Telephone Number field as a String and so keep any leading zeros? I.e. to override the connection's assumptions about the field being a Number.

I tried using a text file to create the report (i.e. text for a "telephone number"), but when I then Set Data Source Location to a file of actual telephone numbers it insists on changing the field to data type Number.

If I use an Excel file I still get the same problem. Cannot find anything on SAP portal, or the Crystal forum about this.