Print Page | Close Window

Access to Group Results

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16958
Printed Date: 28 Apr 2024 at 1:14pm


Topic: Access to Group Results
Posted By: Flying Eyeball
Subject: Access to Group Results
Date Posted: 04 Jul 2012 at 2:19am
Hello!

I'm working with CR (2011) for just 2 days, so there are still problems with the codes and so on.

My problems/questions so far:
  • is it possible to use common SQL or PL/SQL commands inside of a report?
  • is it possible to get access to group - results or calculate them by myself?
  • How to use a global variable so that it's not 0 in the report header?

Those are obstacles, if you want to evaluate cumulated (minute)-values, set back to 0 after each group of work-shifts.

Each shift has a defined begin- and endtime. Not all shifts got a record in at the end of the shift (but they schould), so if this record does'nt exist, the resttime to the shiftend should be added to the last record of a group(shift).
 
Status:
I inserted a group-result with the group-result-operation 'maximum' for each column.
 
Those values are correct for the individual shifts (except for the ones where there is no record at the end of a shift), and i used a diagram visualizing the values.
 
The problem is, that a total-diagram is wanted in the report header, but its values cant be calculated with the the group-result-options, because by using 'summarize' all already cumulated values would be summed up again. By using 'maximum' - only the highest value of each column from all shifts would be taken.
 
I tried to solve this problem with a global variable, which - per record at the end of a shift - is increased by this value.
But beside the problem that shifts where no record is at the end of the shift are ignored, i noticed that the global variable shown in the report header always has the value 0.

I've got the same problems in my subreport.

I hope the problem is still understandable,

ty for answers!



Replies:
Posted By: comatt1
Date Posted: 31 Aug 2012 at 6:00am
s it possible to use common SQL or PL/SQL commands inside of a report? -- yes setup a database and right click and setup command

is it possible to get access to group - results or calculate them by myself? running totals and evaluate when not = 0

How to use a global variable so that it's not 0 in the report header? you have to use report header, but you could always suppress report header, and move everything to footer and create multiple footers



Print Page | Close Window