Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Exporting at group level to csv

Exporting at group level to csv

Exporting at group level to csv

Hi guys,

Using Crystal 2016. I have a scheduled report that I need to export to a csv format. I'm working with patients and appointment times. There are times when a patient has more than one appointment on the same day. I created a group on patient account number, and am sorting that group by appointment time with earliest appointment on top. I've suppressed the detail line, and am showing all the appointment info on the group header. Viewing in Crystal shows me exactly what I want. Exporting to csv shows a line for each appointment the patient may have that day, with the earliest time on each line. The scheduler I am working with doesn't give me options to isolate report/page sections, and isolate group sections, which would give me exactly what I want - headers appearing once at the top of the page, and patients appearing in only one row, showing the earliest appointment time. Is there another solution to this?

Thanks in advance.


RE: Exporting at group level to csv

Two things you could try (I couldn't test this):

Eliminate the suppression and use group selection instead (report->selection formula->GROUP):


This assumes you have limited data to a particular date and then grouped on person.

If that doesn't work for the export, create a SQL expression that returns the minimum appointment {%minappt}:

Select min(a.`appt`)
From table a
Where a.`person`=table.`person`

The punctuation depends upon your data source. Whether to include or exclude the 'a' within the min function (only) depends upon your Crystal version.

Then in report->selection formula->record, add:


This should work, because the other appointments will not even be in the dataset for the report.


RE: Exporting at group level to csv

Thanks LB. I'll give that a try a bit later on today. I appreciate your help.

RE: Exporting at group level to csv

Doing a group selection worked perfectly. Thanks for your help.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close