Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to display specific records Post Reply Post New Topic
Author Message
ncfit
Newbie
Newbie


Joined: 05 Dec 2011
Online Status: Offline
Posts: 4
Quote ncfit Replybullet Topic: How to display specific records
     Posted: 06 Dec 2011 at 2:04am
Hi there. I am new to crystal reports and i'm using crystal 9 version. I search already the web but to no avail.

My requirement is very simple but i don't know how to do it. I need only to display specific records from a table. This is my table MyTable and here's what i want to achieve ReportToBe.

Thank you very much in advance.

Edited by ncfit - 06 Dec 2011 at 2:06am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Dec 2011 at 7:24am
attach the table as your data source
in the select expert enter
{table.posting_code} in ['0000-1-01-10-10','0000-1-01-30-04','0000-1-01-30-06']
 
place the posting_code and journal_amount fields on the detail section.
sort by posting_code ascending.


Edited by DBlank - 06 Dec 2011 at 7:24am
IP IP Logged
ncfit
Newbie
Newbie


Joined: 05 Dec 2011
Online Status: Offline
Posts: 4
Quote ncfit Replybullet Posted: 06 Dec 2011 at 5:53pm
Thanks DBlank for your suggestion. I forgot to include in my requirement that it should be automatically displayed because these journal amounts changes from time to time but the posting will always be the same in everytime the report is generated. The purpose of this report is to generate these journal amounts that corresponds on the specified posting codes without user intervention to avoid errors from users.
IP IP Logged
ncfit
Newbie
Newbie


Joined: 05 Dec 2011
Online Status: Offline
Posts: 4
Quote ncfit Replybullet Posted: 07 Dec 2011 at 1:46am
I tried using the sql expression field and below is the sql code:

SELECT "table"."journal_amount"
WHERE "table"."posting_code"='0000-1-01-10-01'

The result is a blank report.

But when you browse field data, there's a data.

I hope someone can help me on this.
Thank you very much in advance.

Edited by ncfit - 07 Dec 2011 at 1:48am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Dec 2011 at 3:52am

the process I gave you automatically displays the data as you need it to.

IP IP Logged
ncfit
Newbie
Newbie


Joined: 05 Dec 2011
Online Status: Offline
Posts: 4
Quote ncfit Replybullet Posted: 18 Dec 2011 at 9:16pm
Thank you DBlank for your suggestion. I resorted to Excel this time.
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