Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: show previous records Post Reply Post New Topic
Author Message
pnini1000
Newbie
Newbie


Joined: 21 Jul 2010
Online Status: Offline
Posts: 14
Quote pnini1000 Replybullet Topic: show previous records
     Posted: 21 Jul 2010 at 1:08am

Hi all,

I create a report and i need to show all the previous records

for exemple:
contract 1
item 1
item 2
item 3
total for contract 1
 
contract 2
item 1
item 2
total for contract 1
total for contract 2
 
and in "contract 3" to show the totals to 1,2,3 contracts...
I try to use with function " previous" but it show only the last  previous record. I want it's show all  the  previous records
 
thank you!
pnini1000


Edited by pnini1000 - 21 Jul 2010 at 1:10am
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 26 Jul 2010 at 9:36am
I am a bit unclear in exactly which values you are after the specific items or totals. I am also not clear on the layout. If you are grouping by contract number you could load the values into an array and then print them out in the desired spot. Though arrays in CR are somewhat limited.

You create your total in a SQL query (Command Object)grouping by contract number and placing it on the report.

You also could likely use something like manual running total formulas, or use group summary amounts.

What choices are available will depend somewhat on your report layout, database, and data you want displayed.

Regards,

John W.
www.CustomReportWriters.net
IP IP Logged
pnini1000
Newbie
Newbie


Joined: 21 Jul 2010
Online Status: Offline
Posts: 14
Quote pnini1000 Replybullet Posted: 26 Jul 2010 at 8:15pm
thanks!
i grouping by contract number and the 'total for contract' is a field from the dataset. how can I load the values into an array?
thank you for your help,
pnini1000 
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 27 Jul 2010 at 9:19am
Here is a nice little discussion of Crystal Arrays and some uses for them. It should give you enough guidance to know if this would be a possible solution.
 
Regards,
John W.
IP IP Logged
pnini1000
Newbie
Newbie


Joined: 21 Jul 2010
Online Status: Offline
Posts: 14
Quote pnini1000 Replybullet Posted: 27 Jul 2010 at 7:47pm
Thank you!
I Know how to use Crystal Array but in this case
what is the index of Array? how can I Know it?
how can I load the value in every group and show every time the corect records?
thanks,
pnini1000
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 28 Jul 2010 at 4:32am
The index should logically follow the sequence of the items entered. I dont recall if the Crystal Array uses zero or one to start the indexing. Regardless, if the contracts are presented in order then Contract 1 would be index 1 (or zero), contract 2 would be index 2 or (1 if zero based). Obviously you will know if this is a solution that will work for you.

As an alternative you could create the necessary in a SQL statement place it in a Command Object and use the returned values.

The point is you have lots of options and will have to choose which ones work best in your particular report.

Regards,

John W.
www.CustomReportWriters.net
IP IP Logged
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