views:

52

answers:

1

i have a parent report and it contains a two sub report. * subreport: item which get all fields from store procedure named spGetReportItem. like ItemName ItemQuantity TotalItemCost ab 4 45 dd 6 98 *subreport: Labour which get all fields from store procedure named spGetReportLabour. like labourName labourQuantity TotalLabourCost ab 44 455 dd 63 986

i want to find the total of totalitemcost and total of totallabourcost and then want grandtotal of totalitemcost and totallabourcost.

i have seen many examples on internet in which shared variable is used in the formula bt the problem is that they have used the table but i m fetching data from stored procedure. so how can i access the stored procedure fields for calculation. like i have seen that many have used:

shared numbervar total:=sum({tablename.ColumnName});

but i have used stored procedure instead of table so how could i find total of field that resultset returns from stored procedure.. plz give me answer as soon as possible.. i need it urgently. thanks..

A: 

The stored procedure in the end should be having a select statement in the end that returns the data. use the tablename in the select statement and that should work out.
It does not matter if its stored procedure or table. To crystal report its just source of data.http://msdn.microsoft.com/en-us/magazine/cc301570.aspx
And you should be able to find out how its represented from the Field Explorer. Just expand the Database fields and drag it on it a section and you can get the representation.

zapping