Link to home
Start Free TrialLog in
Avatar of Taras
TarasFlag for Canada

asked on

Crystal Report show group title with no records.

In Crystal Report I have two groups.
Group 1 is Club Name.
Group 2 is Club Role.
Then I have members in those club roles.

User wants to see always all 10 Club Role groups on report, does not matter if there is member in or not in group.
If there is no member for Club Role group then show Club Role Title and empty space for detail records.
Any idea?
I can not insert new query or table in report or do Union on existing tables.
Avatar of Mike McCracken
Mike McCracken

Check the attached report.

mlmcc
Q-28230032.xls
Q-28230032.rpt
The trick is to use formulas to watch for missing roles and display them in the group header before the next role

Similarly at the end of the report or outer group to look for roles that are still to be displayed

mlmcc
Avatar of Taras

ASKER

clmcc.
 In the formula DisplayMissingLeadingRole

This part

While  CurrentRoleIndex <= UBound(ClubRolesList) AND {Sheet1_.ClubRole} > ClubRolesList[CurrentRoleIndex]  do

What "{Sheet1_.ClubRole}" in my case is? Is that GroupName or  field Name that group is based on or what?.
And
Should not  it be :
While  CurrentRoleIndex <= UBound(ClubRolesList) AND {Sheet1_.ClubRole} < > ClubRolesList[CurrentRoleIndex]  do
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Taras

ASKER

Is the sort order of Role groups as in DeclareVariables?
Should I remove sort order specified from my Group Sort order.
Avatar of Taras

ASKER

Thanks a lot.
Avatar of Taras

ASKER

clmcc
It is not working  I saw that your source file is sorted my query is not. I am getting some roles 2 times in a club some roles missing not showing on report??.
For that to work they need to be sorted in ascending order.  If you have specified the order the testing will need to change.

Try using <> in the test

The Array values MUST be in the order you expect them to appear on the report

mlmcc
Avatar of Taras

ASKER

My ClubRoles Have diferent names not Role1, Role2
Change the array value list to be the names of your roles

mlmcc