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

Grouping within Cross-Tab?

Status
Not open for further replies.

M4XiMuS

Programmer
Sep 1, 2009
7
US
I have a field that contains entries with and without hyphens. I am attempting to group on this field within a cross-tab, but I only want to include entries that do not have hyphens. Some example entries below:

{REPORTER_STATUS.PROCESSID}

E1000
E1001-00

Is there anyway to group within the cross-tab and only include entries WITHOUT hyphens?

Be advised that I cannot filter this within the record selection criteria because the main report needs to contain the raw data list with both hyphen and non-hyphen entries.

Please help!
 
You could use a formula to say
If Instr({REPORTER_STATUS.PROCESSID},"-")=0
Then {REPORTER_STATUS.VALUEFIELD]
else 0

use that as the summary field in your crosstab and set the crosstab option to suppress empty rows/columns. That should remove the zero values from the crosstab and hence the process ID's with a hyphen.

Alternate approach is to process your data with a record selection filter inside a subreport with the crosstab

Editor and Publisher of Crystal Clear
 
@ chelseatech

The subreport approach solved the problem. I appreciate you bringing that methodology to my attention, as I had overlooked incorporating it due to banging my head against the wall all afternoon trying to solve this. Much appreciated! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top