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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strings From .csv File Being Interpreted As Numbers At Runtime

Status
Not open for further replies.

alhamil5

Programmer
Feb 20, 2003
19
US
Even though I've defined ALL source data field types as String in my .ttx file, for some reason my report is treating any numeric data it finds in my source data file as a Number data type. This is a problem because where I want the report to print -001 for example, it's printing -1. Also, where I have a column in which some records contain numeric data and some contain alpha data, the report leaves alpha fields blank and treats the numeric data as numbers (i.e., -1 instead of -001). This report seems only to want Number data fields. Details:
------------------------------------------------------------------------------------------------
I'm running Crystal version 8.5. The report is run via a Visual Basic 6 executable I wrote; the executable makes a connection to a .csv source file, passes the data to a pre-defined Crystal Report file, runs the report, then outputs it in Adobe Acrobat (.pdf) format. Since the .csv source file is created on the fly at runtime, a .ttx file is being used in the Crystal Report designer for field layout and formatting. I do not have the 'convert nulls to default' option turned on in CR. I do not have the 'save data with report' option turned on in CR. I have the report set to verify the database at runtime. I've tried surrounding my data fields with quotes and double-quotes in the source data file, but neither method worked. When I open the .csv file directly in Notepad, I see the data as it should appear --- i.e., -001 appears as it should and I see alpha values in certain records. But when I run the report, -001 prints out as -1 and the alpha values don't print at all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top