SSRS Reporting problem

Hi,

I’m having a DUPLICATE Data on my SSRS Report. can anyone know how to solved this issue?..

Thanks,

r0bert

Is this standard report or Customized ? if it’s customized, then just let us know whats your data source type ? Could you elaborate?

Hi Vishal,

I’m new here at AX, this is Customized report, using Query my data source tables are SalesTable and SalesLine for basic details of SO, and the additional Data comes from InventSum to get the Qty OnHand…

my Query look like this.

1768.query.jpg

Thank you for your prompt response,

r0bert

and I also have RDP, see details below…

public void processReport()

{

Query query;

QueryRun queryRun;

QueryBuildRange queryBuildRange;

QueryBuildDataSource queryBuildDataSource;

SalesTable salesTable;

SalesLine salesLine;

InventSum inventSum;

pickinglist_contract contract;

super();

query = this.parmQuery();

contract = this.parmDataContract();

queryBuildRange = query.dataSourceTable(tableNum(salesLine))

.findRange(fieldNum(salesLine, SalesId));

if(!queryBuildRange)

{

query.dataSourceTable(tableNum(salesLine))

.addRange(fieldNum(salesLine, SalesId));

}

queryRun = new QueryRun(query);

ttsBegin;

while(queryRun.next())

{

salesTable = queryRun.get(tableNum(salesTable));

salesLine = queryRun.get(tableNum(salesLine));

inventSum = queryRun.get(tableNum(inventSum));

tmpList.clear();

tmpList.initValue();

tmpList.ItemId = salesLine.ItemId;

tmpList.ItemName = salesLine.itemName();

tmpList.Qty = salesLine.SalesQty;

tmpList.InventLocationId = salesLine.inventDim().InventLocationId;

tmpList.InventSiteId = salesLine.inventDim().InventSiteId;

tmpList.wMSLocationId = salesLine.inventDim().wMSLocationId;

tmpList.UM = salesLine.SalesUnit;

tmpList.InventQtyAvailPhysical = InventSum.availPhysicalCalculated();

tmpList.SalesId = salesLine.SalesId;

tmpList.Address = salesline.salesTable().deliveryAddress1();

tmpList.DeliveryName = salesLine.salesTable().DeliveryName;

tmpList.TransDateTime = salesLine.createdDateTime;

tmpList.insert();

}

ttsCommit;

}

If the data duplicates, Just check the tmp table property ‘tabletype’ it should be TmpDB. Or else check your logic.

hi rober

As for ur post i suggested to you check your Query i think that is issue… also check as told vishual …

I Hope that u will understood.

Regards,

Syed Abuthahir.N

Hi Vishal,

my TmpTable look like this …

4314.tabletype.jpg

Thank you so much,

r0bert

Hi Syed,

Yes, I think that’s my problem, when my Query Data source are SalesTable and SalesLine my Data looks fine, when I add InventSum Table n my Data source, the data will duplicated

do you have any solutions on this matter??..

Thank you,

r0bert

Whats your requirement ?? why do you want to involve InventSum in your query? If you would like to calculate On-Hand information, why don’t you check InventOnHandQuery and in your process query, based on salesline ‘itemid’ calculate onhand.

Hi robert

In your Query Data Source are Salestable and Sales Line are Proper relation is there (SalesId) , But there is no relation Inventsum so that when u add that table as datasource . the data will duplicate… so pls explain your requirement also need of Adding InventSum Table.

Regards

Syed Abuthahir

Hi robert

I suggested to change your query as a exists join in Salse line datasource → JoinMode ->ExistsJoin … it may be work properly.

Regards

Syed Abuthahir.N

Hi Vishal,

My Customized Report Look like this.

Highlighted in Yellow from Data source SalesTable and SalesLine,

Highlighted in Red from InventSum… I want to show/get the QTY Onhand of d Item.

and picture show’s my problem re: Duplicate Data

Thanks you,

r0bert

Hi Syed,

I want to get the Available Phisical Qty, and put it on my Customize report.

7838.OnHand.JPG

Thank you so much,

r0bert