Normal Topic Report Issues: Break by Month & Count (Read 1288 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Report Issues: Break by Month & Count
Jun 21st, 2005 at 9:31pm
Print Post Print Post  
I am having some trouble with a report that I need to break by month and count multiple columns.

If I set the break value to 30, it breaks the date element every 30 days in my report and this is not what I want.  I need to break by months.  If I set the break value to 1 or 0, it obviously just breaks when the day changes.  My date format is MM-DD-YYYY.

Also, I have multiple counts on 3 elements within this report.  They all return the same count regardless if there is info in the element or not. i.e.: 20 prospect records in the report with a NEW column that needs to only count the Y's in it (6 of them). 

Is there a way to accomplish the above ?

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Issues: Break by Month & Count
Reply #1 - Jun 21st, 2005 at 9:47pm
Print Post Print Post  
Have you tried to create an Invisible Number Field (DateMonth) to hold the Month value of the Date?

Put the following line in your programming following any programming that might change the value of DateElement

DateMonth=@Month(DateElement)

Now use that field in the Group Break area.

You can also use that field in a Saved Sort Spec.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Report Issues: Break by Month & Count
Reply #2 - Jun 22nd, 2005 at 1:13pm
Print Post Print Post  
You may also be able to use ForceGroupBreak and break on anything you want, even if there is no column - any variable or LE in the report.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Report Issues: Break by Month & Count
Reply #3 - Jun 22nd, 2005 at 9:33pm
Print Post Print Post  
Bob:

That invisible Month field works like a charm !

Do you have any other tricks to deal with the count feature  ?

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Report Issues: Break by Month & Count
Reply #4 - Jun 22nd, 2005 at 9:37pm
Print Post Print Post  
Mark:

I tried the ForceGroupBreak feature.  It works but does not deal with the Month break as per above. 

I will keep it in mind on other reports.

Have you encountered the count issue ?

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Report Issues: Break by Month & Count
Reply #5 - Jun 22nd, 2005 at 9:54pm
Print Post Print Post  
Louis,

In both cases the answer is to use variables instead of directly using column values. In the case of breaking by month - derive the month from the date column in question and use a conditional ("if" statement) to control whether to call ForceGroupBreak. As to using the count "auto", you can use a global static variable and whatever conditionals you prefer, to count by rules - such as "only include non-blank values as countable".
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Issues: Break by Month & Count
Reply #6 - Jun 22nd, 2005 at 10:36pm
Print Post Print Post  
I missed the count issue.......try this:

If you do @Sum(Boolean LEName) then all the TRUE values will be "counted" (TRUE=1). 

-------------------------------
Subsequent note:  The suggestion above was untested, and does not work as is.
« Last Edit: Jun 23rd, 2005 at 10:59pm by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Report Issues: Break by Month & Count
Reply #7 - Jun 23rd, 2005 at 7:11pm
Print Post Print Post  
Bob:

Did you actually get this formula to work ?  I have had a little trouble with it.

I assume that you added an unbound number field in the report and pointed the formula to an existing boolean field.

I am going to play with the variables Mark has suggested for now.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Report Issues: Break by Month & Count
Reply #8 - Jun 23rd, 2005 at 10:06pm
Print Post Print Post  
To deal with the count issue, I did the following:

1. Created an invisible unbound number field (LE17) in the Group Body with the following code (LE11 is the boolean field):

IF LE11 = 1 THEN
{
     LE17 = 1
}
ELSE
{
     LE17 = 0
}

2.  Created a Sum calculation field in the Group Footer that sums LE17.

Now it only counts the required values.

Any inherent dangers in above ?

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Issues: Break by Month & Count
Reply #9 - Jun 23rd, 2005 at 10:58pm
Print Post Print Post  
Quote:
Did you actually get this formula to work ?
Not yet.  My suggestion was an instant response to the problem.  Sorry if it took up too much time.  I usually note when suggested is not tested.  (Will do that now.)

Now I will have to test it out.  May need to change the Boolean LE to a number before doing a sum.......
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged