Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2005
    Posts
    27

    Question Unanswered: Print a field only once, supress the rest

    Hey everyone,

    I've a problem that has been stumping me. I'm sure there's a way to do this, but I can't figure it out!

    I have a report about an event. I need to print on the top of the report the conductor of the event. However, it is repeating several times in the subreport I've created to do this.

    I have the Event table. For each event, there are several music pieces being played, which are linked to the event table. Each of those music pieces has the conductor linked to them. So when I grab the conductor name out of those child tables, it repeats several times because it is stored in the child tables and not the main event table. I need it to only show up once, but I've been unable to figure out how to tell Crystal that.

    How would I make a formula so the name only prints once even if it appears in several records?

    Thanks for any help you can provide!

  2. #2
    Join Date
    Jul 2005
    Posts
    50
    It's hard to know how to tell you what to do without seeing the way you have the report set up. I'm not sure why you chose to use a subreport.

    If you can post an MS Access mdb with a subset of the data as you have it laid out, and the report, I could look at it and suggest a method.

    If I were trying to end up with what it seems you are, I'd have one report (no subs), and use Headers in such a way as to manipulate the data for what I want to show, and eliminate repitition of other data by removing the field from the Detail section. For instance, if you grouped the data by Conductor, you can have the one name on a Header, with all his/her events and pieces listed underneath in the Detail.

    In some cases, using formulas, I display information without using the Detail at all, so I can customize the display for a particular format.

  3. #3
    Join Date
    Jun 2005
    Posts
    27
    Thanks for replying.

    I require subreports because of the way the data is set up. If I don't put certain tables in subreports, they cause the entire report to repeat if there is more than one child record linked to the parent record (and there usually is). When I put them in subreports, any child records repeat, or rather list, within the parent record as they should, and the children in the subreport change for each parent record. If I don't put the children into a subreport, and put them in the main report instead, they don't repeat when I need them to, and the entire report repeats when I DON'T want it to.

    Basically, sometimes I do need data to repeat. In this particular case and subreport, the data repeating is mostly the same for the field I'm using in the report, and I want to suppress the ones that are the same so each unique one only shows once, and if there is more than one unique conductor, those will print once.

    I'm using Oracle, not Access on the db side, but in any case, not really possible for me to put it online.

    On second thought, perhaps I should use a sql query to make a custom "table" and use that instead of the actual table. I think there's a "select distinct" thing with SQL...hmmm...

  4. #4
    Join Date
    Jul 2005
    Posts
    50
    Quote Originally Posted by domini
    Thanks for replying.
    ...
    I'm using Oracle, not Access on the db side, but in any case, not really possible for me to put it online.

    On second thought, perhaps I should use a sql query to make a custom "table" and use that instead of the actual table. I think there's a "select distinct" thing with SQL...hmmm...
    Just post up a pdf so I can see what the output looks like (unless the info is confidential). I HAVE sometimes done most of the work in SQL (View or Stored Proc) when I needed certain things that became too convoluted just taking a straight recordset into Crystal to format.

  5. #5
    Join Date
    Jun 2005
    Posts
    27
    Hey--thanks for getting back to me. You've been answering a lot of things in this forum! Thank you.

    I think I've solved it for now...I put it into the header of the subreport. Not sure if it does what would be ideal, but working with the data I had it seemed to work well, and that's all that matters.

  6. #6
    Join Date
    Jul 2005
    Posts
    50
    I often make "creative" use of headers to customize output in difficult "format" situations.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •