I don't know if this will work, but something to try. Create a formula that states something like:<br><br>If IsNull({FieldName]) or Trim({FieldName]) = "" Then<br> 0<br>Else<br> {FieldName]<br>Then use this formula in place of the field.<br><br>Hope it helps. Keoki<br> <p>Keoki<br><a href=mailto:gb@cardinalhill.org>gb@cardinalhill.org</a><br><a href= > </a><br>
Thanks Keoki for your response.<br><br>But I think I have oversimplified my problem. My situation is that I have to GROUP the results generated from a formula:<br><br>{field_1} - {field_2}<br><br>The GROUP has been 'specified' into 0,1,2....29. My problem is that, for example, none of the results is 15, then the GROUP
Thanks Keoki for your response.<br><br>But I think I have oversimplified my problem. My situation is that I have to GROUP the results generated from a formula:<br><br>{field_1} - {field_2}<br><br>The GROUP has been 'specified' into 0,1,2....29. My problem is that, for example, none of the results is 15, then the GROUP '15' will not be shown. What I want is something like<br><br>Group Count<br>----- -----<br> 15 0<br><br>As simple as that? Thanks very much, It really bothers me for a while.<br><br>>yuenie.
I found a workaround to this problem by making the group a sub-report, then using a formula in the report footer to evaluate the count. if it was 0 or null, then output
Thanks NTSGuru. But my concern is that I have to make 30 subreports as I said the range is 0,1,2...29. Am I right?<br><br>Also, based on that result, I have to draw a bar chart (with running totals as well). It may cause problem if I used 30 subreports or 30 formulaes for generating the result.<br><br>>Yuenie.
Here's an idea.<br><br>Create a formula that checks to see find the difference of the next group from the current group:<br><br>Create a formula such as "Next Group Change" like: <br>Next({@Group Formula}) - {@Group Formula}<br><br>(Where {@Group Formula} = {field_1} - {field_2})<br><br>Create a Group B Text Formula:<br>If ({@Group Formula} + 1) = ({@Group Formula} + {@Next Group Change} - 1)<br>Then ToText({@Group Formula} + 1)<br>Else ToText({@Group Formula} + 1) + "-" + ToText({@Group Formula} + {@Next Group Change} - 1)<br><br>Add a section below in your group footer, so you have a group footer A & B.<br><br>Conditionally suppress section B if Group Change is less than or equal to 1. (Using a formula such as {@Next Group Change} <= 1)<br><br>Put the Group B Text Formula in line with the Group field. Place a text box with a "0" in it in line with the counter fields.<br><br>If you have a gap of more than 1 group it may look like:<br><br> <U>Group</U> <U>Count</U><br> 15 0<br> 16 5<br> 17-20 0<br> 21 6
Nilsen's example of group checking is the closest you will get. There is no way of showing a group in the original "perfect" order when no data is returned from the Crystal side of the processing. There are various hardcode workarounds to dummy up a report to make it look like groups but not act like them dynamically.<br><br>The only workaround that I have found is to use a stored procedure that includes a default value for every group needed. Of course you will have to know how the report will be designed to do this.<br><br>The report I'm referring to used a stored procedure to show all 12 months of the year - but the dilemma, of course, was missing months when no date was found for that group. The client did not want to see Jan. Feb. May. July - so the only fix was a stored procedure that checked for the date and inserted a value equal to the month I was looking for. It was extremely tricky - and there were many other considerations as well, but in the end it worked. <br><br>Having groups appear regardless of data returned has been a wish for Crystal report writers everywhere for many versions. <br><br><br> <p>Cody ford<br><a href=mailto:codyjford@hotmail.com>codyjford@hotmail.com</a><br><a href= > </a><br>VB, VBS, Seagate Info/Crystal Reports<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.