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

Sections not suppressing

Status
Not open for further replies.

samson123

Programmer
Jun 17, 2005
79
US
Suppression

I am using CR XI, Access 2000.
I am dynamically displaying values based on the user selection.

Following is the layout of the report

?Param1 ?Param2 ?Param3 ?Param4 ?Param5 ?Param6

@Col1 @Col2 @Col3 @Col4 @Col5 @Col6


?Param# are parameter accepting MULTIPLE VALUEs.

@col1 formula and the other &col# are the same, except ?Param#

@col1
-------
Select {?Param1}[2]
Case "CONID":totext({TCON.CONID},"00")
Case "CONFNM": {TCON.CONFNM}
Case "CONMNM": {TCON.CONMNM}
Case "CONLNM": {TCON.CONLNM}
Case "CONCMP": {TCON.CONCMP}
Case "CONTPID": {MMISCCD.CDVLDESC}
default: ""

It is grouped by formula @grp1

@grp1
------
Select {?grpParam1}
Case "CONID":totext({TCON.CONID},"00")
Case "CONFNM": {TCON.CONFNM}
Case "CONMNM": {TCON.CONMNM}
Case "CONLNM": {TCON.CONLNM}
Case "CONCMP": {TCON.CONCMP}
Case "CONTPID": totext({TCON.CONTPID})
default: ""

I have 6 sections
GF1a, GF1b,.... GF1f


?Param1 ?Param2 ?Param3 ?Param4 ?Param5 ?Param6

Details @Col1 @Col2 @Col3 @Col4 @Col5 @Col6

GF1a @Count6
GF1b @count5
GF1c @count4
GF1d @count3
GF1e @count2
GF1f @count1

@count6 and all the fomula are the same excecpt the numbers
@count6
-----
Select {?grpParam1}
Case "CONID": count({@col6},{@grp1})
Case "CONFNM": count({@col6},{@grp1})
Case "CONMNM": count({@col6},{@grp1})
Case "CONLNM": count({@col6},{@grp1})
Case "CONCMP": count({@col6},{@grp1})
Case "CONTPID": count({@col6},{@grp1})
default:0

I have a formula @colnumber

@colnumber
---------------
numbervar column1;
numbervar column2;
numbervar column3;
numbervar column4;
numbervar column5;
numbervar column6;

if len({?Param1}[2]) > 0 then column1 := 1;
if len({?Param2}[2]) > 0 then column2 := 1;
if len({?Param3}[2]) > 0 then column3 := 1;
if len({?Param4}[2]) > 0 then column4 := 1;
if len({?Param5}[2]) > 0 then column5 := 1;
if len({?Param6}[2]) > 0 then column6 := 1;

column1+column2+column3+column4+column5+column6;

To suppress the sections GF1 thru GF6 I have in their corresponding section the following code

GF1a-> Suppress-> x+2-> {@colnumber} <> 6
..
.
.
GF1f-->Suppress-> x+2-> {@colnumber} <> 1

My PROBLEM:

These sections are not suppressing the count.
For example, if I pass 4 parameters, This is what I see

?Param1 ?Param2 ?Param3 ?Param4

Details @Col1 @Col2 @Col3 @Col4


GF1c @count4
GF1d @count3
GF1e @count2
GF1f @count1

THIS IS WHAT I EXPECT TO SEE

?Param1 ?Param2 ?Param3 ?Param4

Details @Col1 @Col2 @Col3 @Col4



GF1c @count4


I am sure I am missing something very obvious..

Please advise.

 
I meant in the parameter setup screen (field explorer->parameter->new).

-LB
 
Sorry LB, I am not understanding what you are trying to say..

I did setup all the parameters thru (field explorer->parameter->new).

I set up 6 parameters ?Param1 thru Param6 and 6 parameters for displaying column names (?Disp1 thru ?Disp6).

Are we talking the same thing ? or I missed your pont

 
I was wondering how you are allowing for someone to choose nothing for a particular parameter. Did you set up a blank option? Or were you able to set up a blank default? As I said, I can't look at my XI to see what the possibilities are. Not sure this is relevant.

-LB
 
LB

The strange thing that I am noticing is that if I preview from crystal it shows me correctly. But when i call the report from Vb and pass parameters, it does not suppress the sections.

There are no default blank values for the parameters
 
I can only help with the CR end, and now it sounds like it's a VB issue. Maybe you should start a new thread, maybe in the CR Integrate forum (forum768).

-LB
 
Oops I will have to start all over again...

But thanks for your time on this issue.. I really appreciate it...

 
Issue resolved on the Crystal Integrate forum by synapsevampire

**********************

Then your concern is likely with VB, not Crystal.

I would guess that you're passing nulls from your VB app so checks such as if len(trim({?Param1})) > 0 don't work the way you expect, so modifying to check for null may resolve, as in:

if not(isnull({?Param1}))
and
len(trim({?Param1})) > 0 then
column1 := 1
else
column1 := 0;

*********************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top