Print Page | Close Window

Crystal report from .csv file

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=221
Printed Date: 24 Apr 2024 at 3:00pm


Topic: Crystal report from .csv file
Posted By: xhp95
Subject: Crystal report from .csv file
Date Posted: 20 Feb 2007 at 2:39am
I need to create a report from data in a csv file the contents of which is given below.   I want to be able to arrange this in columns as follows:
 
Day     Nov-06      Day   Dec-06    
1        <blank>     1        0.00
2       <blank>      2        0.00
..        <blank>     ..        0.00
20      <blank>    20      10.00
29       0.00         ...
30       0.00         ...
31       <blank>   31      10.00
 
Reading the data from below and having stripped out the text from .. Market Card Results .... Stock: 0.00. 
 
I found this rather daunting not having wrote a crystal report from csv file before.  
 
Any help will be much appreciated
 
thanks
xhp95
 
 
Market Card Results
Daily Breakdown - Total AH/USD (LME): Forward FX Position,  Shown in Lots and Square Card.  All physicals are included.
Stock: 0.00
Day,Nov-06 Cum Pos
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,0.00
30,0.00
31,
Total,
Day,Dec-06 Cum Pos
1,0.00
2,0.00
3,0.00
4,0.00
5,0.00
6,0.00
7,0.00
8,0.00
9,0.00
10,0.00
11,0.00
12,0.00
13,0.00
14,0.00
15,0.00
16,0.00
17,0.00
18,0.00
19,0.00
20,10.00
21,10.00
22,10.00
23,10.00
24,10.00
25,10.00
26,10.00
27,10.00
28,10.00
29,10.00
30,10.00
31,10.00
Total,

 


-------------
xhp95



Replies:
Posted By: BrianBischof
Date Posted: 20 Feb 2007 at 10:04am
Crystal Reports prints from CSV files by using the Access/Excel option of the data source dialog box. Click on it and then on the file type, at the bottom will be listed Text files. Use that to print from your file.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: xhp95
Date Posted: 20 Feb 2007 at 10:18am
Thanks.  But what I am looking for is to arrange the data into columns as shown in my original enquiry.  

-------------
xhp95


Posted By: BrianBischof
Date Posted: 20 Feb 2007 at 10:43am
Oh I see. This is the ACTUAL text file you'll be importing. Well, it's a pretty screwed up data file. Can you massage the data at all? In the current format, it would take a while to play around with it to get what you want. I would look at customizing the SQL statement to re-order the data in the way you need. I haven't done this for a CSV file before so I can't say the exact method to do such a thing. If you're new to CR, then this might be pretty challenging. Your best bet is to see if you can rearrange the data before importing it into CR like this. As it is, it's not an easy task.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: xhp95
Date Posted: 21 Feb 2007 at 1:06am
Thanks.   I dont have access to the sql that generates this file.  I could reorganise it in excel but that would be an added step in the process - someone has to do that first before importing into cr and then running cr.
 
I'm looking at other alternatives.
 
thanks
 


-------------
xhp95



Print Page | Close Window