Skip to Content
0
Former Member
Apr 26, 2009 at 12:44 AM

problem in group selection on a summary

22 Views

Hi

I have a report with some fields like:

Acc_no Campus Collection CalL_num Num_times_borrowed

title

XXXXXXXXXXXXXXXX (GH1 Title)

XXXXXXXXXXXXXXXXX(GH2 ITN.ID) suppressed

xxxx1 xxxxx xxxxx xxxxxxx 0

xxxx2 xxxxx xxxxx xxxxxxx 1

xxxx3 xxxxx xxxxxx xxxxxxx 2

num_times_borrowed was calculated by a @number_times_issued:

if {OND.IRN} = 0 THEN

0

ELSE

DistinctCount ({OND.IRN}, {ITN.ID})

Then I created another @formula2;

in order to summaries items in the detail section:

whileprintingrecords;

NumberVar number_issued_per_title;

number_issued_per_item := number_issued_per_item + {@number_times_issued};

another forumla simply to display the value:

whileprintingrecords;

NumberVar number_issued_per_item;

and final formula to reset the number count:

whileprintingrecords;

NumberVar number_issued_per_item := 0;

1. I found I only can put summary value (3 in the above example)in the Group footer; I wish I could put the summary value with the group header where the Book title is.

2. How is it possible to select the group by a parameter based on a summary?

At the moment when I used in report group selection formula with:

DistinctCount ({OND.IRN}, {ITN.ID}) < tonumber({?Times borrowed})

if the parameter is 2, there will be returned some records with 0, 1 (number of times borrowed), but if the parameter is 1, there is nothing returned in the report.

For this report, the one of the purpose is to find all titles that have never been borrowed up to a certain date, which means the summary must be 0

At the report record selection formula where I have:

{MAIN.XCODE} <> "S" and

{ITD.DTE} < {?Item Acquired Date} and

{INST_VIEW.DESCRIPTION} = {?institute}

Could anyone who has experience in this scenario please advise ?

Thanks in advance

John

Edited by: John Sun on Apr 26, 2009 2:45 AM

Edited by: John Sun on Apr 26, 2009 2:46 AM