Hi guys i have proplem in report i make report consist from three data item g/laccount g/lentry g/l entry2 like above i put two text boxes in FromNo,ToNo in Request form to filter document no Meaning as example i will write from document no 2 to 122 but i face proplem third data item g/lentry2 i want to group g/laccount no and credit amount i dont know how to make grouping in third data item by g/laccount no . how i make setrange in third data item to accept range of document no between these two numberes. can any one help me thanks
You are filtering the G/L Entry Data on the basis of G/L Account & then from Document No. of G/L Entry ?
Try using SetFilter.
To show you what i need is ex :
in request form
From No 130 (documentNo)
To No 134 (Document No)
Report what i need like this :
Date DocNo No Name CreditAmount
12/12/12 130 130101 cash in hand 10000
13/12/12 131 130101 cash in hand 50000
14/12/12 132 130102 tradeRecivable 20000
14/12/12 133 130102 tradeRecivable 1000
15/12/12 134 130103 pettycash 3000
Total 84000
group no Total
130101 60000
130102 21000
130103 3000
this is report what i need .
Can you told me how…the proplem in this report how i make grouping inlast of report as following :
group no Total
130101 60000
130102 21000
130103 3000
this third data item are i make g/l entry or g/l account and how i make grouping .
any one told me how
in third data item i make g/l entry with no indentation then write this code :
“G/L Entry2”.SETRANGE(“G/L Entry2”.“Document No.”,StDate,Enddate);
“G/L Entry2”.SETRANGE(“G/L Account No.”,“G/L Account”.“No.”);
“G/L Entry2”.CALCFIELDS(“G/L Entry2”.“Credit Amount”);
are this true and i dont make grouping
thanks
Thanks guys I solved my solution as following :
g/laccount(no identation)
g/lentry(one indentation)
g/laccount1(no indentation)
I create three data item :
on pre data item(g/laccount1) :
“G/L Account1”.COPYFILTERS(“G/L Account”);
Debitsum :=0;
after get record trigger i write following(g/laccount1) :
FinalSum:=0;
recgl.RESET;
recgl.SETRANGE(recgl.“G/L Account No.”,“G/L Account1”.“No.”);
recgl.SETRANGE(recgl.“Posting Date”,StDate,EDate);
recgl.SETRANGE(recgl.“Source Code”,“G/L Entry”.“Source Code”);
IF recgl.FINDSET THEN
REPEAT
FinalSum:= FinalSum+recgl.“Credit Amount”;
UNTIL recgl.NEXT=0;
Debitsum := Debitsum+FinalSum;
IF FinalSum =0 THEN
CurrReport.SKIP;
then in second data item (g/l entry)
i write as following
“G/L Entry”.SETRANGE(“G/L Entry”.“Posting Date”,StDate,EDate);
this is for posting date and if you need between two document no use setfilter best because when i need all document in one branch i can write xx* it will accept but setrange not accept
meaning replace setrange with set filter above and and stdate,enddate with from no ,to no and define in globale variables fromno,to no