cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to sum up results of "details" section??

alexsr700
Participant
0 Kudos
115

Hi everyone,

I am creating reports of work orders using Crystal Reports.

The problem is, that all of the information is stored per work order and not per project. I would like to somehow create a summary of all the jobs that were performed in a project. Is that possible?

Hierachy: Each "project" consists of x "work orders". Each "work order" consists of y "jobs".

I can report all of the jobs by iterating through the work orders using the "details" section. But that will only produce x pages of jobs which will quite often repeat each other. I would like to generate a report in which each "job" is only listed once even if it is performed numerous times.

Project 1 - Workorder 1 - Jobs: A, B and C

Project 1 - Workorder 2 - Jobs: A, D and F

Project 1 - Workorder 3 - Jobs: F, B, C, X, Y, Z

The result should be just one single page reading: "A, B, C, D, F, X, Y, Z"

Is this possible and could someone help me to get this to work?

Thank you very much and best regards

Alex

Accepted Solutions (0)

Answers (2)

Answers (2)

DellSC
Active Contributor
0 Kudos

Ido's answer is good if you need a count of jobs and you use a Distinct Count summary. However, I don't think that's what you're asking for.

Try this:

1. Group by Project.

2. Create a formula that will be used to generate an array of job titles. Something like this:

WhilePrintingRecords;
StringVar Array jobList;
if OnFirstRecord or {Table.ProjectID} = Previous({Table.ProjectID}) then
  jobList := MakeArray({Table.JobName});
else if not {Table.JobName} in jobList then
(
  Redim Preserve jobList[uBound(jobList) + 1];
  jobList[uBound(jobList)] := {Table.JobName};
);
""

Put this formula in the details section. It won't display anything because of the "" at the end.

3. Create a formula that will display the list of jobs. It will look something like this:

WhilePrintingRecords;
StringVar Array jobList;
Join(jobList, ". ")

This formula will have to go in the project Group Footer - it will not work in the group header.

-Dell

ido_millet
Active Contributor
0 Kudos

Group the report on Project and within that by Job to get summary of jobs per Project.

If within the same report you wish to ALSO see summary by Job (not by project), the simplest solution is to Insert, Crosstab or, for more complex needs, use a Subreport grouped by Job.