Solved

Crystal Reports Groups

Posted on 2011-03-01
4
238 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
[X]
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
  • 2
4 Comments
 
LVL 101

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 35

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 101

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
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 …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

690 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