Summary report

I am create report based on workidcreateddate and time in warehose manage ment. this the main tables how can i join these table

WHSWorkTable wHSWorkTable;
WHSWorkLine wHSWorkLine;
PwCAdviceMainTable pwCAdviceMainTable;
PwCRTWInquires pwCRTWInquires;
SalesTable salesTable;
CustTable custTable;
EcoResProductCategory ecoResProductCategory;
InventTransferJour inventTransferJour;
InventItemBarcode inventItemBarcode;
PwCItemApproval pwCItemApproval;
InventTable inventTable;
InventDim inventDim;

give me any one suggestion.

It depends on what data you want to show in the report. Most them look standard tables, you can look at the relations between them try writing a query. Give a try and let us know for any questions.

Looks like custom tables. Try investigating the relations.

this two table are custom table sir. PwCAdviceMainTable realation between salestable based on salesid and pwCRTWInquires is relation to whsworkline based on workid.

how to write the query statement tell me sir.when i run the report its taking so much of time

If you already have the query and it is taking much time to run, then you need to optimize it.

docs.microsoft.com/…/x-standards-select-statements

Hi,

I just another duplicate post of your of the same requirement.

Please use the same thread and don’t repeat the same questions multiple times.

https://dynamicsuser.net/ax/f/developers/95628/join-thetables

Regards,

Bharath K

sir , i am written this code in process report but report its taking so much of time

select wHSWorkLine
join pwCRTWInquires
where pwCRTWInquires.WorkId == wHSWorkLine.WorkId;

select salesTable
join pwCAdviceMainTable
where pwCAdviceMainTable.SalesId ==salesTable.SalesId
join custTable
where custTable.AccountNum == pwCAdviceMainTable.CustAccount;
select * from inventTransferJour;

report excuetion is its taking so much of time , how to reduce this tell me. i am written this code

select wHSWorkLine
join pwCRTWInquires
where pwCRTWInquires.WorkId == wHSWorkLine.WorkId;

select salesTable
join pwCAdviceMainTable
where pwCAdviceMainTable.SalesId ==salesTable.SalesId
join custTable
where custTable.AccountNum == pwCAdviceMainTable.CustAccount;
select * from inventTransferJour;

It depends on how you are going to use the data returned by these select statements. Remove unnsessary table

Example - If you are not using any fields from pwCRTWInquires use can change it to exists join. Use field list in the select statement.

Why is this select? You are just selecting with out any condition.

sir i am writeen this code but still its taking lot of time

select wHSWorkLine index hint WorkIdLineNumIdx
join wHSWorkTable
where wHSWorkTable.WorkId == wHSWorkLine.WorkId
&& wHSWorkTable.createdDateTime >= fromDateTime
&& wHSWorkTable.createdDateTime <= toDateTime
join pwCRTWInquires index hint WorkId
where pwCRTWInquires.WorkId == wHSWorkTable.WorkId
join pwCAdviceMainTable
where pwCAdviceMainTable.CustAccount == pwCRTWInquires.CustAccount
join custTable index hint AccountIdx
where custTable.AccountNum == pwCAdviceMainTable.CustAccount;