Solved

Crystal Reports Groups

Posted on 2011-03-01
4
233 Views
Last Modified: 2012-05-11
I have attached a rpt to look at.
1. Page 6 - If the client has only 1 page, it should hide 'Allergies: See Allergy Infor on first page".

2. Page 10 - If the client has No known Allergies , it should hide the first "Allergies: No known allergies"

Thanks
Test.rpt
0
Comment
Question by:rustypoot
  • 2
4 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
Comment Utility
There is no way to know the length of a group or how many pages it takes when the header is built.

mlmcc
0
 
LVL 34

Accepted Solution

by:
James0628 earned 250 total points
Comment Utility
For #2, if "the client has No known Allergies" means that there is at least one record for ClientDisplayName where Code is "No Known Allergies", or where AllergyDeclarationType is 2, then you could use a formula to count those records and suppress that field, or the GH2 section, based on that formula.  For example, create a formula like this:

if {hsp_eMARDowntime.AllergyDeclarationType} = 2 then
  1


 Then you could use this to suppress the field/section:

Sum ({formula above}, {hsp_eMARDowntime.ClientDisplayName}) > 0


 As for #1:
 The "client" is group 2 (ClientDisplayName), correct?
 If the report was formatted in a very structured way, then you might be able to tell from something like the number of records in the group how many pages it was going to be, but your report doesn't seem to be like that.  I don't think that you'll be able to tell in the group 2 header how many pages the group will be.  But do you really need to?

 You say that you want to hide "Allergies: See allergy info on first page" if the client has only one page, but even if they have more than one page, showing that on the first page wouldn't seem to make sense.  So, maybe you just want to hide that message on the first page for a client, no matter how many pages they have.  That you could theoretically do.

 The basic idea would be to add a new GH2 section above the current one, use a formula in the new section to reset a variable, then check that variable in the current GH2 section and if it hasn't been set yet, suppress that message (either the field or the whole section), and set the variable.  Then the second time that the old GH2 section comes up, the variable will have been set, so the message is displayed.

 An added complication is that you have group 2 set to repeat the group header on each page and you're using (not InRepeatedGroupHeader) to suppress GH2, so you'd have to take that into account, but I think it could be done.

 The question is, does suppressing that message on the first page for a client (group 2), whether the client has just one page or multiple pages, sound like it will give you what you're looking for?

 If not, can you come up with some other condition to check for, instead of "the client has only 1 page"?

 James
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now