yolly12
MIS
- Mar 21, 2005
- 83
Environment: Crystal 8.5 developer. SQL 2000 SP4, GoldMine CE 6.7
Hello,
I am writing a report that I need to display a total sum of activities by month. Problem si that some activities are still pending (CAL) and some are closed (CONTHIST). I came up with the idea of a shared numbervar since the data is displayed in subreports and now i just need to add it up.
So I created a formula for sales:
If ({cal.rectype}) startswith "S" then 1 else 0
then i created a shared numbervar
shared numbervar countcal;
countcal := count(@sales)
then on the main form, I created another formula for closed activities
If ({conthist.rectype}) startswith "S" then 1 else 0
then created a display formula
while printing records;
shared numbervar countcal + count{@closed sales};
the number dispalying is not correct. i checked the first set on the subreport on it's own and it displays the totals but the shared numbervar is not sorting by month (I have a group for createon date, sort by month) the first formula is fine though. The shared numbervar shows the correct total. As for the completed one, I have no idea of where it gets it's number from.
any ideas?
thanks in advance for the help
Hello,
I am writing a report that I need to display a total sum of activities by month. Problem si that some activities are still pending (CAL) and some are closed (CONTHIST). I came up with the idea of a shared numbervar since the data is displayed in subreports and now i just need to add it up.
So I created a formula for sales:
If ({cal.rectype}) startswith "S" then 1 else 0
then i created a shared numbervar
shared numbervar countcal;
countcal := count(@sales)
then on the main form, I created another formula for closed activities
If ({conthist.rectype}) startswith "S" then 1 else 0
then created a display formula
while printing records;
shared numbervar countcal + count{@closed sales};
the number dispalying is not correct. i checked the first set on the subreport on it's own and it displays the totals but the shared numbervar is not sorting by month (I have a group for createon date, sort by month) the first formula is fine though. The shared numbervar shows the correct total. As for the completed one, I have no idea of where it gets it's number from.
any ideas?
thanks in advance for the help