how to get the sum of qty , and amount by given range in ssrs reports

give me suggestions.

I think you can explain your issue better.

Please add enough description, so that the people who are trying to help you may not waste their time in extracting the information from you.

sir, inventttrans report . i want sum of qty and amount by given date range

I still don’t see enough explanation. I hope the below is what you are looking for, if not explain.

See below example,

select sum(qty), sum(costAmount) from inventTrans

where inventTrans.TransDate >= fromDate && inventTrans.TransDate <= toDate

Sir, my requirement is Iam created new table (invent group) and added 2 fields I’d and description and created simple list form these two fields and same I’d field I am added in invent item group item table after I am given edt relations between both tables. Iam given I’d field under the itemgroup in item master form manage costs. But in my report I am used 3 parameters one is I’d and from date and todate. My report fields is itemid and item name and qty and cost amount and weight avg cost price. These fields are I want show in report. Date range filter reference field is status receipt field purchased and reference field purchase order. And sum of qty and sum of cost amount. How 2 write the logic and send me the code. I am written code in rdp class but data is not fetching properly. How get the full data in report plz help me sir.

Can you show your code?

while select InventoryValueGroup from inventItemGroupItem
join inventTable
join inventTrans
join inventTransOrigin
where inventTransOrigin.RecId == inventTrans.InventTransOrigin
&& inventTrans.DatePhysical >= fromDate
&& inventTrans.DatePhysical <= toDate
&& inventTrans.ItemId == inventTable.ItemId
&& inventTable.ItemId == inventItemGroupItem.ItemId
&& inventItemGroupItem.InventoryValueGroup == inventoryValueGroup
if (inventTrans.StatusReceipt == StatusReceipt::Purchased && inventTransOrigin.ReferenceCategory ==
InventoryValueTmp.PurchID = inventTransOrigin.ReferenceId;
InventoryValueTmp.FinancialDate = inventTrans.DateFinancial;
InventoryValueTmp.Quantity = inventTrans.Qty;
InventoryValueTmp.ItemId = inventTrans.ItemId;
InventoryValueTmp.ItemName = inventTable.itemName();
InventoryValueTmp.CostAmount = inventTrans.costValue();
sumQty += inventTrans.Qty;
sumCostValue += inventTrans.costValue();
InventoryValueTmp.SumQty = sumQty;
InventoryValueTmp.SumCostVAlue = sumCostValue;



while select inventTrans
        where inventTrans.StatusReceipt == StatusReceipt::Purchased
           && inventTrans.DatePhysical >= fromDate
           && inventTrans.DatePhysical <= toDate
        join inventTransOrigin
        where inventTransOrigin.RecId == inventTrans.InventTransOrigin
           && inventTransOrigin.ReferenceCategory == InventTransType::Purch
        join inventTable
        where inventTable.ItemId == inventTrans.ItemId
        join inventItemGroupItem
        where inventItemGroupItem.ItemDataAreaId == inventTable.dataAreaId
           && inventItemGroupItem.ItemId == inventTable.ItemId
           && inventItemGroupItem.InventoryValueGroup == inventoryValueGroup 
        // insert code here

sir sum of qty and cost amount how to do .

You can use those variable and insert a separate record and show it in the report.

Or you can do the sum at the SSRS report level (without adding any sum fields to the temp table)

sir , how to get the itemid selectlookup in ssrsreports .

Please create a new thread. Don’t combine multiple issues in one thread.

sir, iam not getting buffers when iam debbugging the rdp class

data is not fetching sir empty report is coming.

Try debugging

iam not getting sir ,help me sir. i put the debuuger buffers not coming debugguger not going inside

Can you show your final code?

sir, data is coming.

Sir, above requirement. I am created aot query. And that query I am called in rdp class. Iam written logic in process report. But I don’t know how to write date filters and status purchased and reference purch.

Query query;

Query run qr;

Inventory contract contract;

Contract = this. Parmdatacontract() ;

Form date = contract . Parmformdate() ;

ToDate = contract. Parmtodate() ;

qr=new Querrun(this. Parm query) ;

While(qr. Next())


Invent table = qr. Get (tablenum(Invent table) ) ;

Inventrans = qr. Get(tablenum(invent trans)) ;

Invent trans origin = qr. Get(tablenum(Invent trans origin )) ;

Invent table module =qr. Get(tablenum(invent table module)) ;

Inventitemgroupitem = qr. Get(tablenum(Inventitemgroupitem) ) ;


//… Inserting recrods


But I don’t know sir…how to write the logic date filter logics in this code … Plzzz tell me sir.

from the query get the data source and add the range (see the example)

query = this.parmQuery();

query.dataSourceTable(tableNum(InventTrans)).addRange(fieldNum(InventTrans, TransDate)).value(queryRange(fromDate, toDate));