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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[b]How to Add Dummy Groups to a Report[/b]

Status
Not open for further replies.

Nassy

Programmer
Mar 27, 2003
121
GB
Describing the Report


I have created a report which lists properties at different stages in their life cycle. The report has a group named Category . The categories are:

[ul]
[li]Appraisals Booked[/li]
[li]Instructions[/li]
[li]Viewings[/li]
[li]Offers[/li]
[li]Sales Agreed[/li]
[/ul]

Each category appears on a separate page.

The report allows the user to enter a Date Range and to select a Branch. A record selection formula has been written to allow Appraisals Booked not to be restricted by date whereas the other categories show properties restricted by date range.


{WeeklyReport.Branch) = {?Office Selection} AND
If {Categories.Category} in ["Appraisals Booked"]
then True
Else
{WeeklyReport.Date} = {?Date Range Selection}




What I am trying to achieve

My Categories table contains some Dummy categories for which there is no data

[li]Boards[/li]
[li]Mortgages[/li]

The idea is to create a page for each of these two groups amongst the other groups on the report so that when the report is exported into Word the user can write what they like on these pages representing these categories.

What the problem is

I can get the 'Dummy' groups to appear if I remove the record selection but as soon as I add the record selection the groups disappear (as I would expect). I am not sure of a way around this other than may be to create a table with every category, office and date combination in it.

If the worst come to the worst I will have to create a separate report with the dummy groups in it and get users to merge the reports themselves. However my boss is keen for me to come up with something more elegant!

Any advice on this would be a huge help.

Cheers

Nassy
 
One approach would be to use a left join FROM the categories table to the one containing the date and then remove the criteria referencing the righthand table from the record selection formula. Instead create formulas like:

if {WeeklyReport.Branch) = {?Office Selection} and
(
if {Categories.Category} = "Appraisals Booked"
then True
Else
{WeeklyReport.Date} = {?Date Range Selection}
)
then {table.amt}//or 1 if you are counting

Then insert summaries (sums) as needed on this formula.

The other approach you could take is to insert a group footer1b and 1c section, and add the text names for the fake groups to these sections. Then suppress them conditionally using the group field:

{table.group1field} = next({table.group1field})

...assuming you have a second inner group. Or if you only have one group, use:

groupnumber <> distinctcount({table.groupfield})

-LB
 
Thanks for this, I'll give it a go!

Cheers

Nassy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top