[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 552
  • Last Modified:

Suppress if duplicated - want to remove blank line

Hi experts

I have written an sp which output information to a table then I have linked this to a crystal report to display the information accordinly.

My report list students who have been absent over a certain length of time per day eg 3 hours - I have made a change to now include the different absent types for each student per day eg student could be sick, absent or class could be cancelled so there is a chance a student could have more than one absent type per day ( i have attached  a spreadsheet to show how one strudent has 2 different absent types in one day)

Thing is when I put this into crystal I am getting each line repeated (using spreadsheet)

student_id       date            start time         end time     total time absent
CCF66723    8/12/2010       9.00                17.00          6:45    
                                                                                      Time absent              description
                                                                                          6:00                      Authorsied Absence

CCF66723    8/12/2010       9.00                17.00          6:45    
                                                                                      Time absent              description
                                                                                          0:45                     Class Cancelled

whereas I would like to see

student_id       date            start time         end time     total time absent
CCF66723    8/12/2010       9.00                17.00          6:45    
                                                                                      Time absent              description
                                                                                          6:00                      Authorsied Absence
                                                                                          0:45                       Class Cancelled

When I use suppress if duplicated I then get a big blank space where the repeated date should be is there anyway to get ride of this line altogether?

Please help as this is driving me insane

Thanks in advance
                     
 example-output.xls
0
lisa_mc
Asked:
lisa_mc
  • 8
  • 4
  • 3
1 Solution
 
peter57rCommented:
Have you created a group for each student ID?

It looks like you need to do so and put
student_id       date            start time         end time     total time absent

into the group header and just the fields for
 Time absent              description

into the detail line.
0
 
lisa_mcAuthor Commented:
Hi peter

I have put a group in for each course, student_id and date

but when I put the first line student_id start time end time and total time absent into the date section I only get one date whereas the student im testing has two dates off.  Plus if I then put it into the details section I get the lines repeated as shown above

really confused and don't know how to fix this

one thing I noticed is when I have the course, student_id and then date grouping and I put all info into the date group and saying the student is off 6/12 and 7/12 you would think I would see both dates? but when I do this I would only see the 7/12
0
 
peter57rCommented:
I was just working on the example you included in your post where all of the fields..
student_id       date            start time         end time     total time absent

are duplicated.

If you are now saying that some of these fields may have different values then I don't really understand on what basis you are trying to combine things together.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
peter57rCommented:
Maybe you need a second group based on date.

Then put all the
student_id       date            start time         end time     total time absent
into the header of the inner group.
0
 
lisa_mcAuthor Commented:
sorry peter was busy there

Your first comment Im not sure what you mean

The values change for each student eg student 1 could be absent 4.5 hrs on a day and student 2 could be absent 3 hours they could also have different absent types within that day (as shown on spreadsheet)

Also a student could be absent 4 hours or more 2 days in a row  - am i making sense or confusing you?
0
 
mlmccCommented:
Have you tried using the SUPPRESS BLANK SECTION option in the Section Expert

mlmcc
0
 
lisa_mcAuthor Commented:
Hi mimcc

I just tried that and im still getting a large space where the date, student_id, total time absent etc should be - is there a way of getting rid of that blank space
0
 
lisa_mcAuthor Commented:
I am looking at a student who is off 6/12 and 7/12 both days started at 9am and finished at 5pm

When I use the suppress if duplicated it takes away the 9am and 5pm for the date 7/12 - I can't have this because I need the start time and end time of each day

Any other suggestions of how to get around this
0
 
lisa_mcAuthor Commented:
sorry excuse that last comment I have suppressed if duplicated where date is equal to previous date

this has cured the problem -  I hope :-)

just have the problem now with the large blank space
0
 
mlmccCommented:
Can you upload the report?

mlmcc
0
 
mlmccCommented:
Does the report have any grouping?

If not try grouping by student id then by date

mlmcc
0
 
lisa_mcAuthor Commented:
hi was off for a few days

I have grouping for campus, dept_code, course, student_id and date

I have student name and information in the student grouping and the rest of information in the details section

so for the particular student that I am looking at the output in the details section looks like this

date                week   start    end      tot_hours   breaks    total_absent        not marked      present        
06/12/2010      15     11.30   17:00    5.30            1:30       4:00                   00:00                 00:00
                                                                                           Time absent       Desc
                                                                                            01:00                Authorised
-----> NEED A WAY OF GETTING RID OF THIS LINE THIS IS WHERE 06/12/2010 would be repeated
                                                                                           03:00                 Unauthorised

where as I need the output to look like this

date                week   start    end      tot_hours   breaks    total_absent        not marked      present        
06/12/2010      15     11.30   17:00    5.30            1:30       4:00                   00:00                 00:00
                                                                                           Time absent       Desc
                                                                                            01:00                Authorised
                                                                                           03:00                 Unauthorised
0
 
mlmccCommented:
Are you suppressing the section or just the field?

Is this all part of a single section?
If each line is in its own section you can either suppress the section or you can suppress the fields and use the SUPPRESS BLANK SECTION in the section expert.

If one section has all the lines then you will need to split it into two or more sections
Right click the section in the left margin
Click INSERT SECTION BELOW
Drag the fields to the appropriate sections.

mlmcc
0
 
lisa_mcAuthor Commented:
Hi mimcc

The problem was I had everything in one section

I never even knew you could have several sections.  Thank you so much for this as it has solved my problem and now my report looks perfect

Thanks again I was at this for ages and could not get it sorted
0
 
lisa_mcAuthor Commented:
fantastic solution thank you so much
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 8
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now