Print Page | Close Window

repeat

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4574
Printed Date: 18 May 2024 at 11:52pm


Topic: repeat
Posted By: remo
Subject: repeat
Date 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



Replies:
Posted By: Savan
Date 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


Posted By: rahulwalawalkar
Date 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
 



Print Page | Close Window