You can't filter shortcut dimension directly in customer ledger. the shortcut dimensions are storing in ledger entry dimensions table, I will give you one solution I think its will solve your problem
add one data item table "Ledger Entry Dimension" in your report after customer data item set the request field Dimension Code,Dimension Value Code
write the code Ledger Entry Dimension - OnAfterGetRecord()
CurrReport.SKIP;
otherwise its will run for all records in Ledger Entry Dimension
go to the Cust. Ledger Entry-CustLedgEntry2
CustLedgEntry2 - OnAfterGetRecord()
create a new variable RsLedgerDimention for Ledger Entry Dimension then
write the code
//001
RsLedgerDimention.RESET;
RsLedgerDimention.SETRANGE(RsLedgerDimention."Table ID",21);
RsLedgerDimention.SETFILTER(RsLedgerDimention."Dimension Code","Ledger Entry Dimension".GETFILTER("Dimension Code"));
RsLedgerDimention.SETFILTER(RsLedgerDimention."Dimension Value Code",
"Ledger Entry Dimension".GETFILTER("Dimension Value Code"));
IF NOT RsLedgerDimention.FINDFIRST THEN
CurrReport.SKIP;
//001
the code using for skipping the other dimensions values entries in customer ledger table
Save and run give the filter
I think it should work
Answers
You can't filter shortcut dimension directly in customer ledger. the shortcut dimensions are storing in ledger entry dimensions table, I will give you one solution I think its will solve your problem
add one data item table "Ledger Entry Dimension" in your report after customer data item set the request field Dimension Code,Dimension Value Code
write the code
Ledger Entry Dimension - OnAfterGetRecord()
CurrReport.SKIP;
otherwise its will run for all records in Ledger Entry Dimension
go to the Cust. Ledger Entry-CustLedgEntry2
CustLedgEntry2 - OnAfterGetRecord()
create a new variable RsLedgerDimention for Ledger Entry Dimension then
write the code
//001
RsLedgerDimention.RESET;
RsLedgerDimention.SETRANGE(RsLedgerDimention."Table ID",21);
RsLedgerDimention.SETFILTER(RsLedgerDimention."Dimension Code","Ledger Entry Dimension".GETFILTER("Dimension Code"));
RsLedgerDimention.SETFILTER(RsLedgerDimention."Dimension Value Code",
"Ledger Entry Dimension".GETFILTER("Dimension Value Code"));
IF NOT RsLedgerDimention.FINDFIRST THEN
CurrReport.SKIP;
//001
the code using for skipping the other dimensions values entries in customer ledger table
Save and run give the filter
I think it should work
regards
Akhilesh
Akhilesh
http://navconsultant.com/
http://www.linkedin.com/in/akhileshek
Ledger Entry Dimension -OnPreDataItem()
setfilter("Entry No.",0);
Akhilesh
http://navconsultant.com/
http://www.linkedin.com/in/akhileshek
thanks a lot for the info