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

Need to pass a date from a subreport to an array in the main 1

Status
Not open for further replies.

crumpm

Technical User
Mar 29, 2010
31
GB
CR 2008 - SQL database

I have a report that shows certain files, if they haven't had activity for a calculated period.

The {@Last Movement} is an array formula

maximum(makearray(file.last_time,file.last_bill,file.open_date))

which works fine.

I now have to add a new element to the array, by bringing in the maximum date from a subreport, which looks at certain transactions on the files, and produces a shared datevar; 1 per file.

However I have tried to use the shared variable , but I keep gtting the message " A summary has been specified on a non-recurring field. Details: @LastMovement"

I have inserted the subreport in Detail section A and the shared variable formaula in Detail B.

I need a way to work around this ?

Thanks
MC

 
Where are you trying to use the shared datevar.

Please show all formula, locations and order in which they are applied

Ian
 
Group 1 - Department
Group 2 - Sector
Group 3 - Team
Group 4 - Name
Detaila - subreport - {Transactions}
Detailb - {@LastMovement} <- This is my array formula
Grp 4 Ftr - summary field (maximum({@LastMovement}, Name)


Hope this helps explain.
Thx MC
 
You can not do a summary of a summary as you have discovered ;-)

in detailb or within sub report add new formula

@maxdate
Whileprintingrecords;

Shared datevar maxdate;
Shared datevar yourexistingdatevar;

If yourexistingdatevar > maxdate then maxdate:=yourexistingdatevar

You can then use this in your Group4 footer

YOu will also need to reset maxdate in grp4 header or SR header

@reset maxdate
Whileprintingrecords;

Shared datevar maxdate:=Date(1900,01,01);

Ian
 
Brilliant, that fixed it :)
Thanks v much
MC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top