Results 1 to 12 of 12

Thread: [RESOLVED] Consolidating details in crystal 10

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Resolved [RESOLVED] Consolidating details in crystal 10

    Hello,
    I'm trying to make my crystal report for the output of a program I'm writing. I want to take two detail lines and condense them to one, but ONLY if a given field is different. For example, let's say a user chooses 10 packages. Three are boxes and seven are bags. I would like to have on detail line say 3 boxes and then the total weights of JUST the boxes, and then 7 bags and the total weights of just the seven bags. How would I do this?

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Consolidating details in crystal 10

    Crystal has many options to turn raw data into a desired format. Groupings, Formulas, Summaries, Running Totals etc. It would help if you posted a sample of the raw data and how you want the report laid out.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: Consolidating details in crystal 10

    I think it would have to be a complex formula involving some kind of variables, but here goes...

    I have an access database that stores information about packages being shipped, each package has a package number (the number of the package in the shipment), a description, a type (Boxes, Bags, Containers, etc), and then various radioactivity measurements.
    An example of such:
    Package No:1
    Type: Box
    Description: Clean Laundry
    Contact Rate: 5mR/hr
    Activity: 5MBq


    Package No: 2
    Type: Box
    Description: Clean Laundry
    Contact Rate: 2mR/hr
    Activity 3MBq

    Package No: 3
    Type: Containter
    Description: Empty Container
    Contact Rate: 3mR/hr
    Activity: .1MBq

    Now assume this is in table form, and what I'd like to have the output be for a given part on my report is....

    Number of Packages: 2
    Type: Box
    Total Contact:7mR/hr
    Total Activity: 8MBq

    Number of Packages: 1
    Type: Container:
    Total Contact: 3mR/hr
    Activity .1MBq

    I've taught myself basic crystal, but what I'd need to do here is iterate through all the fields of description, and count which ones are similar, add up the radioactivity values, and then display the total count, the similar description, and radioacitve sums while still maintaining the ability to have more than one type of package be displayed. I know how to get a sum, but I don't know how to take a sum of only a certain amount and create the script to continue to add details of each different kind of package...

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Consolidating details in crystal 10

    I don't know how to take a sum of only a certain amount and create the script to continue to add details of each different kind of package...
    If you add a Group to the report (in your case based on the Type field) and include Summary fields Crystal will handle totalling everthing correctly.
    Create two formulas that extract the numeric data from the Contact Rate and Activity fields. You can then create summary fields on those formulas.

    It wasn't clear from your post but do you want to total by Type and Description or just by Type? I assumed just Type but if you want totals by Type and Description then add another Group based on the Description field.

    Now it is just a matter of displaying the fields and formulas. Place them in the Group Footer and Suppress the Details section.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: Consolidating details in crystal 10

    Well, the output on that page won't contain the description. it will simply be quantity of a given type, then the type, then a UN listing code of that type of shipment (not the description of the packages) then the total contact rate as a summation of just that type, then total activity as a summation of just that type, and then any additional types and so so on.

  6. #6
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Consolidating details in crystal 10

    Then you only need the 1 Group based on the Type field.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: Consolidating details in crystal 10

    when i create the group it creates the header and footer for the group .... I'm going to try to attach an ms word document of the way I want the output to look...

    but I don't understand how to create a summary for just the group. I know how to create a summary field for ALL records of a given field (for example, the total number of packages,) but I don't get how I'm supposed to sum up the info from the current group only.

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: Consolidating details in crystal 10

    I just tried creating a group and came up with each package being displayed and sorted by group. Problm is I don't want EACH package to be displayed, I want to have it say that there are two containers then the dose and contact rate sums of both, the one bag, etc... i'm going to try to upload that word file now to make it clearer...

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: Consolidating details in crystal 10

    here's the file
    Attached Files Attached Files

  10. #10
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Consolidating details in crystal 10

    I only have version 8.5 here so I hope the menu items are the same in 10.

    but I don't understand how to create a summary for just the group.
    Use the Insert -> Summary menu. The Group.jpg attachment is a screenshot of this dialog. In this sample the report is grouped by CategoryId and the Summary type is Count. When you click okay Crystal will add this field to the Group Footer section. Use the Report -> Top N/Sort Group Expert menu to sort the Groups based on the Count summary field.

    Since this report summarizes the data, the Details section should be Suppressed. Place all output fields in the Group Footer.
    Attached Images Attached Images  

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: Consolidating details in crystal 10

    brucevde, when I said summary, I wasn't speaking in crystal terms, just layman terms. I fairly new to crystal (I've only been using it for about 2 days) so I don't know how to do a lot. Take a look at the word document I posted.

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: Consolidating details in crystal 10

    I did get it working. Thank you. I had to use the details field to populate all the details of the group then creat a summary in the footer by right clicking on the detail and selecting summary and changing it to be in the footer. Now on to page two of the report....

Posting Permissions

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



Click Here to Expand Forum to Full Width