Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group on formula creates blank header? 1

Status
Not open for further replies.

dragonturtle

Programmer
Sep 25, 2003
55
CA
Hi,

I'm creating a report with a group based on a formula that concatenates two dates from startDate and endDate columns in a database table. The table only has two records (will grow later), so the group outputs the two headers as expected. However, it also outputs a third blank header.

(I find this blank header appears on every group on formula I create, regardless of formula.)

Suppress Blank Section gets rid of the blank header, but when I add a summary to the group footer, the summary for the blank header still shows (it summarizes the two actual groups above).

Why does this blank header appear, and how do I get rid of it?
 
it would really help if you showed your formula you grouped on....read my tagline

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Sure. Here's what I used:

Code:
If
   {tblSurveyGen.time} > {tblSurveyDate.startDate} 
And 
   {tblSurveyGen.time} < {tblSurveyDate.endDate}
Then 
   Left(CStr({tblSurveyDate.startDate}),11)&&quot;-&quot;&Left(CStr({tblSurveyDate.endDate}),11)

There are only two records currently in tblSurveyDate. The group header should only output if there are records in tblSurveyGen within the date range specified by startDate and endDate.

Which works fine, except for the blank.

 
your grouping formula should always have a default condition

In your case the default is NULL...not a good value to group on.

This is a selection criteria rather than a grouping criteria

in your record selection you would have

({tblSurveyGen.time} > {tblSurveyDate.startDate} and
{tblSurveyGen.time} < {tblSurveyDate.endDate}) And
...rest of record selection...

then you simply group on this formula

//@Group1

Left(CStr({tblSurveyDate.startDate}),11)&&quot;-&quot;&Left(CStr({tblSurveyDate.endDate}),11);

you should have no problems then



Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top