Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Pulling out data Post Reply Post New Topic
Author Message
charlie82
Newbie
Newbie


Joined: 08 Jul 2010
Location: Singapore
Online Status: Offline
Posts: 2
Quote charlie82 Replybullet Topic: Pulling out data
    Posted: 08 Jul 2010 at 9:11pm
Hi All,
 
I have a table named Charges.
There is a field named Cur.
 
I creating a report and there is a sub report.
In the sub report i need to pull out the Cur data.
I try to use an array to present the Cur data.
 
Below is what i wrote.
I am very very new to crystal report. Sorry if i do not understand alot of thing.
 
 
whileprintingrecords;
SHARED StringVar THCO_CUR;
SHARED StringVar Array THCO_CUR_LOAD;
NumberVar i;
NumberVar NumRows := Count (THCO_CUR_LOAD);

For i:= i to NumRows do
    (If THCO_CUR <> '' THEN
    (THCO_CUR_LOAD:= THCO_CUR_LOAD;
    i = i + THCO_CUR_LOAD;))
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 20 Jul 2010 at 3:10am

1) don't know where the formula is being run

2) CR only reads 1 row at a time
3) you never reference an array member  bracket i endBracket
4) what is this supposed to do?  you keep setting a variable equal to itself...so nothing is changing
 
 
 


Edited by lockwelle - 20 Jul 2010 at 3:11am
IP IP Logged
charlie82
Newbie
Newbie


Joined: 08 Jul 2010
Location: Singapore
Online Status: Offline
Posts: 2
Quote charlie82 Replybullet Posted: 20 Jul 2010 at 2:31pm

Hi lockwelle,

 
Thanks for your reply. Actually i am quite new to Crystal report. Not very sure how to write the array.
What i actually need to to pull out the currency from the table.
Is there anyway i can show you my report and you can teach me how can i present the currency?
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 21 Jul 2010 at 3:22am
Sorry, no.
 
Crystal is good at reading rows, but if you are looking for something, Crystal is not the tool.
 
If you want a list of currencies that are present in the data for the report, I would suggest a subreport, it will read all the data and can report back with an array that you can format into a string.  If you want to filter a report by the currencies, you can use a command object to select the different currencies and present them to the user as a parameter, and then you can filter the data based on the user's response.
 
So the biggest question seems to be, how do you want to use the currency values that you are looking for?  For display or as a parameter to filter?
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.