Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Working within groups conditionally

Posted on 2012-03-30
5
224 Views
Last Modified: 2012-04-02
I simply cannot wrap my head around working within groups. Can someone explain to me how limiting formulas to just what's inside groups works? What techniques/tutorials can you share that would shed some more light on this subject?

My problem is that I have a report that contains data grouped by Patient Name. The report's group header needs to show if Document A, B, C or D is due or needs to be signed.

1. If Document A has not been created for the patient of the group, then show "Create document A"
1a. If Document A was created, but not signed, show "Sign Document A"

Note: I would also need to be able to show messages based on name of document, user of document, not just dates.

The logic would pretty much continue from there. The groups can have an infinite amount of records returned based on how many documents have been created at the time the report was run.

Maybe if we could work out a solution for this example, it might help me understand the logic a bit more.
0
Comment
Question by:susnewyork
  • 2
  • 2
5 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 37788202
You will have to explain how the conditions you describe are identified.

So how do you identify if DocA has been created or if it has or has not been signed?
0
 
LVL 1

Author Comment

by:susnewyork
ID: 37788268
There will be an entry into the Document table stating when it was created and what the status of the signature is (signed or not)
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 37789069
So you have 1 record per document for a user?

Try something like this
Name - IsDocumentA
If {DocumentType} = 'A' then
    1
Else
    0

You can then use a summary for the field on the group to see if it is created
   If Sum({@IsDocumentA},{PatientId}) =  0 then
        "No Document A created"

For a signature on document A
Name - IsDocumentASigned
If {DocumentType} = 'A' AND {IsSignedField} = True then
    1
Else
    0

You can then use a summary for the field on the group to see if it is created and signed
   If Sum({@IsDocumentA},{PatientId}) =  1 and Sum({@IsDocumentA},{PatientId}) = 0 then
        "Document A created, unsigned"

Similarly for other document fields and signatures

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37789078
I think you are also asking how the SUMMARY functions can be limited to a group

SummaryFunction({SomeField},{GroupField})

By adding the GroupField in the summary function, Crystal then limits the summary evaluation to records in the current group rather than for the entire report.

mlmcc
0
 
LVL 1

Author Closing Comment

by:susnewyork
ID: 37798306
Thanks for the help, as usual. I have another question most likely coming your way.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question