Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Summing groups Post Reply Post New Topic
<< Prev Page  of 2
Author Message
TokyoAnt
Newbie
Newbie


Joined: 16 Feb 2007
Online Status: Offline
Posts: 30
Quote TokyoAnt Replybullet Posted: 25 Mar 2007 at 8:46pm
Hi Hilfy,
 
Thanks fro your response & suggestions.
In implementing what you put forward, I came across what I feel is the crux of the problem here. It's in the
 
If left({table.OrganizationName}, 2) = 'IS' then {detail table.count} else 0
 
conditional.
 
For some reason, my code completely ignores this. It never choses it, even though I've tested the string to be 'IS' when manipulated (by displaying it).
 
I'm currently putting this in a formula as suggested. I've tested the formula to return a simlpe value "7" for example. That works fine, but when I create a global variable, & increment it in the "If" conditional above , it returns 0. Why would this be the case.  Even if I create a simple globalVar := globalVar + 1; globalVar;  it always returns 0.
 
Shouldn't this increment for every row in each group that starts with "IS"?
 
Thanks very much for your thoughts on this
 
Ant
 
 
 
IP IP Logged
TokyoAnt
Newbie
Newbie


Joined: 16 Feb 2007
Online Status: Offline
Posts: 30
Quote TokyoAnt Replybullet Posted: 25 Mar 2007 at 8:50pm
Even this returns 0;
 
if Left(({ResourceUsageReport.OrganizationName}),2) = "IS"
    then
        111;
 
 
I've displayed Left(({ResourceUsageReport.OrganizationName}),2)
& it returns "IS"
 
Hope this helps.
 
Ant
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 26 Mar 2007 at 7:25am

How are you using the formula?  You don't put the actual formula on the report, but instead you'll use the SUM of the formula.  I created the formula based on your example - does the field data actually start with 'IS'?

Just as a test, put the formula in the details line next to the actual count field.  It should display either the count or 0 depending on what kind of a line it's on.
 
-Dell
IP IP Logged
TokyoAnt
Newbie
Newbie


Joined: 16 Feb 2007
Online Status: Offline
Posts: 30
Quote TokyoAnt Replybullet Posted: 30 Mar 2007 at 12:20am
Hey Hilfy,
 
Thanks for all your input. Fortunately (phew) the company structure has changed which meant I just went into the Backend table & trimmed all the fields to the first two characters IS,MC etc. So now I don't need to worry about this conundrum. Apologies for this. It is a very interesting problem without yet a solution. Something tells me that this cannont be done in Crystal as I've tried so many differerent way, many being your ideas as well.
 
Oh well, it's all a learning experience!Ouch
 
Thanks very much anyway!
 
Ant
IP IP Logged
<< Prev Page  of 2
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.