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

Suppress already read records

Status
Not open for further replies.
Apr 11, 2002
193
IN
Hi,

I want to take sum of a field for a group and if the sum is less than 100 then i have to suppress all the records for the group. Now my problem is how can i suppress records which the report has already read.

Please suggest, i have to do this without subreport.

Thanks,
Manish
 
Hi LB,

You had given me a logic for suppression of the entire row which was

//{@concat}:
{table.skills}+{table.status}+{@percent}

...and then use a suppression formula like:

{@concat} = previous({@concat})


I tried doing
{@skills}+{@status}+{@percent} // = {@suppression}

Then went in the format of {@skills} and wrote
{@suppression} = previous({@suppression})

this gave me a error saying that previous or next is not applicable.

Here again {@status} is calling many other formulas. Please suggest.

Thanks,
Manish
 
I am confused, because what appeared to be fields now appear to be formulas ({@skills} and {@status}). You must share the contents of all formulas (and any nested formulas within them) for further help. It would also help if you updated us on what you are trying to do. Are you still talking about detail-level fields/formulas? Is the only change that {table.status} is now a formula resulting in "Off" or {table.status}? Again, please show sample data and what you would like the results to look like.

-LB

 
Hi,

I am really sorry for not giving the full details. I have 3 formula fields in the detail section.

1) {@skills}
2) {@status}
3) {@percentage}

{@skills} has
whileprintingrecords;
numbervar CountSkills;

if {table.MCSLocation}="none" then
(
"Not Covered";
)
)
else
(
CountSkills := CountSkills + 1;
{table.skills};
);


{@status} has
whileprintingrecords;
numbervar countStatus;


if {table.skills}="None" or {table.skills}="none" then
(
countStatus := countStatus + 1;
"N/A";
)
else
(
if not isnull({table.skills}) then
(
if {@statusOff}<>"999999" then
(
countStatus := countStatus + 1;
{@statusOff}; //this displays "Off"
)
else
(
if {@not active}<>"999999" then
(
countStatus := countStatus + 1;
{@not active}; //this displays "Not active"
)
else
...//other conditions


{@statusOff} has //which is a inner formula inside {@status}

if mid({table.status},1,2)="ad" and {table.adon}=0 then
"Off"
else if mid({table.status},1,2)="ap" and {table.apon}=0 then
"Off"
else if mid({table.status},1,2)="dc" and {table.dcon}=0 then
"Off"
else
...//it goes on to check 27 conditions


{@percentage} has
whileprintingrecords;

if isnull({table.WeightedPercent})=true or {table.MCSLocation}="None" then
(
""
)
else
(
{table.WeightedPercent};
totext({table.WeightedPercent},0)&"%"
);


These are the formulas that i use and the data generated looks like
Skills Status %
AP 3.25 Mastered 100%
AP 3.25 Mastered 100%
AP 3.25 Mastered 85%
PR 0.90 In progress 10%
NC 2.60 Not Mastered 20%
DC 1.90 Mastered 100%

Here Skills is {@skills}, Status is {@status} and % is {@percentage}.

If you need anything else then please let me know.

Thanks,
Manish

 
Hi again,

I forgot to give the groups. There can be several scenarios wherein we can have duplications.

Grouping is :
Group1 {table.CoreGoalDesc}
Group2 {table.stateid}
Detail

The senarios can be :

CoreGoalDescribtion
State Id Skills Status Percentage
Number Operations //Group1
COMA08-6.2 //Group2
Not Covered N/A
Not Covered N/A
Not Covered N/A
Factors //Group1
COMA08-6.2 //Group2
Not Covered N/A
//In this case the Skills are not covered. I need to remove the duplicate.

Next senario

CoreGoalDescribtion
State Id Skills Status Percentage
Number Operations //Group1
COMA08-6.2 //Group2
AP 3.25 Mastered 100%
AP 3.25 Mastered 100%
AP 3.25 Mastered 85%
PR 0.90 In progress 10%
NC 2.60 Not Mastered 20%
DC 1.90 Mastered 100%
Not Covered N/A
Not Covered N/A

Thanks,
Manish
 
I think if you simplified your formulas, you could use the concatenation method. To use the previous function, you would need to avoid using variables and "whileprintingrecords" in your formulas and also remove the counter from each formula. You could do counts in separate formulas or by inserting summaries. From what I can see there is no real need for variables here.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top