Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: repeat Post Reply Post New Topic
Author Message
remo
Newbie
Newbie
Avatar

Joined: 18 Oct 2007
Location: Singapore
Online Status: Offline
Posts: 12
Quote remo Replybullet Topic: repeat
    Posted: 19 Oct 2008 at 11:56pm
here is 1 prob for me i would like to show records under jobno like this.i sorted it according to job no.repeated job no should come first like this
JOB NUMBER        MESSAGE DEc
200810170028    qqq
200810170028    et
200810200001    tgr
200810200001    rthg
200810180001    ert
200810180002    erte
200810200003    rtg

but now itz somting like this

JOB NUMBER        MESSAGE DEc
200810170028    qqq
200810170028    et
200810180001    ert
200810180002    erte
200810200001    tgr
200810200001    rthg
200810200003    rtg

plz help me thanx in advance
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 20 Oct 2008 at 3:04am

This is not possible in normal way. But there is one way to do it. Create a formula  named "reprec" which has following syntax.

if <fieldName> = previous(<fieldname>) or <fieldname> = next(<fieldname>) then
        0
else
        1
 
Now you supress the records where reprec <> 0
 
now you create a subreport with same data and formula. In that report you supress the records where reprec = 0.
 
so in this way u get the duplicate records in the top and non duplicate later.
 
I think this is not a correct way, but this may match exactly your requirement.
Thanks
Savan
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 23 Oct 2008 at 6:08am
Hi,
 
Main Report
What you can do is ,Group By Job Number,Then Insert Summary Count of Job number .
 
Once done go to Details Section and Select Section Expert by right clicking then in Suppress DrillDown Click X+2 and enter the code below
 
Count ({Table_Job.JobNo}, {Table_Job.JobNo})=1
 
Suppress Group Header and Footer,
 
Subreport
 
Then save the same report as single record jobreport,follow the same process for grouping summary, but in that enter the below code for details section and suppress rest of the sections. this will be your subreport data
 
Count ({Table_Job.JobNo}, {Table_Job.JobNo})>1
 
 
Once done place the subreport in report footer of main report.
 
Cheers
Rahul
 
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.