Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: lookup data upon summery outcome Post Reply Post New Topic
Author Message
bierlaagh
Newbie
Newbie
Avatar

Joined: 23 Mar 2011
Location: Netherlands
Online Status: Offline
Posts: 3
Quote bierlaagh Replybullet Topic: lookup data upon summery outcome
     Posted: 23 Mar 2011 at 9:37am
hi all,
 
i've looked over sevaral forums an used google but could not find the awnser hope you can help!
 
for my report i use sevaral summeries. one of the sumery outcome is an indexnumber of one of mij DB tables.
 
example:
tablex
 
index  articleshort dscr  article lang discr
1              xy                     xyza
2              sm                    abcf
 
the summery outcome is 2 now i want to lookup the long discription wicht belongs to index nr 2 the summery is something like NthSmallest (1, {Orderinformatie.Prijs per eenheid})
 
how can i create a function that looks up the article lang discr based on the summery fiels nthsmallest where nthsmallest = index
 
i need this on my report footer where a written summery will be placed including the outcome of these functions
 
again hope someone can help, and read my poor englisch Tongue
 
 


Edited by bierlaagh - 23 Mar 2011 at 9:41am
IP IP Logged
bierlaagh
Newbie
Newbie
Avatar

Joined: 23 Mar 2011
Location: Netherlands
Online Status: Offline
Posts: 3
Quote bierlaagh Replybullet Posted: 24 Mar 2011 at 4:27am
anyone?
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 24 Mar 2011 at 4:37am
I'm not sure what you are looking for, but this is what I'm assuming:

When you run the report, you will calculate an index while it is reading records from the database.

And then you will grab the description located at the record with that index number and print that value at the end of the report?

A possible problem I see is that your index is calculated from the summary, and I'm not sure if you can go back to the records and pick the particular record.

But I haven't tried so I'm not sure.

Edited by Keikoku - 24 Mar 2011 at 4:39am
IP IP Logged
bierlaagh
Newbie
Newbie
Avatar

Joined: 23 Mar 2011
Location: Netherlands
Online Status: Offline
Posts: 3
Quote bierlaagh Replybullet Posted: 24 Mar 2011 at 4:57am
that is indeed what i am looking for.
the calculated index is the same as the index in mij database.
 
and i still have not found a formula to search for the description that belongs to that calculated index.
 
so still hope someone at this forum knows how to get this done.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Mar 2011 at 5:03am
The only thing  I can think of would be to use a subreport and use the calculated field as the link

Edited by DBlank - 24 Mar 2011 at 5:03am
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 24 Mar 2011 at 5:14am
Only way I know how to "search" for the index is while crystal is reading or printing the records, check the value of index.

But I don't know if summaries are done while reading records, or while printing records. If it's done while printing records you're stuck.
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