Solved

Crystal Reports Groups

Posted on 2011-03-01
4
234 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
ID: 35011119
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
ID: 35015248
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
ID: 35275383
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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 Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

920 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

16 Experts available now in Live!

Get 1:1 Help Now