how can i filter a report by gl entry posting date?

how can i filter a report by gl entry posting date?

hi , If you have in the filter section G/L entry then simply select your field and do a filter.

You should start with the documentation first.

Gabor

Hi Moni,

What Are the data items you are using in your report ?

Thanks

Jerome Marshal. J

Hi Moni,

What are the data items your using ? is that is baes report or newly created report ?

Thanks

jerome Marshal. J

i used G/L entry and Sales Invoice line data item.

actually i am caluculating total discount by cash, by credit and by other, according to posted and unposted from G/L entry and general jouranl line and sales line and sales invoice line.

i need a filter according to posting date.

Did you try

G/L Entry.SETRANGE(“Posting Date”,Fromdate,Todate);

hi mohona, yes. I tried it. my request form is not shown at first. how can i show it.

hi mohona, yes, i tried it. my request form is not shown. how can i show it?

if you want to filter GL Entries directly the you can use use ReqFilterFields, other wise you are not using the sale invoice header in your report , but youhave sale invoice line using that youcan get the sale invoice header and get the posting date from that sale invoice header.

then apply it as filter in Gl entry table using SetRange statement.

Thanks

Jerome Marshal. J

Do you want to filter , or you want the user to make a filter ?

IF the user should do the fitler then on the data item properties set the ReqFilterFields .

g.

Hi Moni,

request Form of which data ites is not shown, go to that data item properties and remove DataItemTableView propety.

Thanks

Jerome Marshal. J

client will input this from request form. then it will set for G/L entry table , general jouranl line table , sales line and sales invoice line table. do you understand?

Can you show us your dataitems list…

did you try by adding posting date in ReqFilterFields property of all dataitems?

Then Create two date variable StartDate and EndDate, Go To View->Request Form , place twi text boxes in that. the assign StartDate and EndDate as source expression for those text boxes. now

OnPreDataItem() of each data item place the set range code for example

“G/L Entry”.setrange(“Posting Date”,StartDate,EndDate);

same way use strange code in OnPreDataItem() of each data item.

Thanks

Jerome Marshal. J

yes, i did that. my data item list is G/L entry

I declared record variable of general jouranl line and sales line ,sales invoice line.table.

i want to set request form at the first tab and user will just put start date and end date for request form page.

am i right?

it is not working. so, i again set GL ENTRY AND SALES invoice line as a data item.

another problem is post order no is duplicate with sales invoice line. but i need only one post order no.

Can you show us what you have done…

Its a simple requirement and you are not able to do even after our explanation…

How much experience you have in nav?

Please contact your senior in office…

// “G/L Entry”.SETRANGE(“G/L Entry”.“Posting Date”,StartDate,EndDate);

// GLine.SETRANGE(GLine.“Posting Date”,StartDate,EndDate);

//////////////Start of G/L Entry Amount Calculation

WITH “G/L Entry” DO BEGIN

IF “G/L Entry”.FIND(’-’) THEN BEGIN
REPEAT

IF (“G/L Entry”.Amount>0) THEN BEGIN
CASE “G/L Entry”.“Payment Method Code” OF
‘CASH’:
BEGIN

totalcash_posted:= totalcash_posted+“G/L Entry”.Amount;

END;

‘CREDCARD’:
BEGIN

totalcredit_posted:= totalcredit_posted+“G/L Entry”.Amount;

END;
ELSE BEGIN

totalother_posted:= totalother_posted+“G/L Entry”.Amount;

END;

END;
END;

IF (“G/L Entry”.“Document Type”=“Document Type”::Payment) THEN BEGIN
//START OF SALES INVOICE LINE.
WITH “Sales Invoice Line” DO BEGIN

IF “Sales Invoice Line”.FIND(’-’) THEN BEGIN
REPEAT

IF (( “G/L Entry”.“POS Order No.”= “Sales Invoice Line”.“POS Order No.”)

AND ( “Sales Invoice Line”.“Line Discount %”>0) ) THEN BEGIN

CASE “G/L Entry”.“Payment Method Code” OF
‘CASH’:
BEGIN

BycashtotalLinediscountSIn:= BycashtotalLinediscountSIn+“Sales Invoice Line”.“Line Discount %”;

END;

‘CREDCARD’:
BEGIN

BycredittotalLinediscountSIn:= BycredittotalLinediscountSIn+“Sales Invoice Line”.“Line Discount %”;

END;
ELSE BEGIN

ByothertotalLinediscountSIn:=ByothertotalLinediscountSIn+“Sales Invoice Line”.“Line Discount %”;

END;

END;

END;

IF (( “G/L Entry”.“POS Order No.”= “Sales Invoice Line”.“POS Order No.”)
AND ( “Sales Invoice Line”.“Inv. Discount Amount”>0) ) THEN BEGIN

CASE “G/L Entry”.“Payment Method Code” OF
‘CASH’:
BEGIN

BycashtotalInvdiscountSIn:= BycashtotalInvdiscountSIn+“Sales Invoice Line”.“Inv. Discount Amount”;

END;

‘CREDCARD’:
BEGIN

BycredittotalInvdiscountSIn:= BycredittotalInvdiscountSIn+“Sales Invoice Line”.“Inv. Discount Amount”;

END;
ELSE BEGIN

ByothertotalInvdiscountSIn:=ByothertotalInvdiscountSIn+“Sales Invoice Line”.“Inv. Discount Amount”;

END;

END;

END;

UNTIL “Sales Invoice Line”.NEXT<=0;
END;
END;

END;

UNTIL “G/L Entry”.NEXT<=0;

END;

END;

//////////////End of G/L Entry Amount Calculation

///////////////////////////////// Start of General Journal Line

WITH GLine DO BEGIN

IF GLine.FIND(’-’) THEN BEGIN

REPEAT

IF( GLine.Amount>0) THEN BEGIN

CASE GLine.“Payment Method Code” OF
‘CASH’:
BEGIN

totalcash_unposted:= totalcash_unposted+GLine.Amount;

END;

‘CREDCARD’:
BEGIN

totalcredit_unposted:= totalcredit_unposted+GLine.Amount;

END;
ELSE BEGIN

totalother_unposted:= totalother_unposted+GLine.Amount;

END;
END;

END;

IF(GLine.“Document Type”=“Document Type”::Payment) THEN BEGIN
///////////////////START OF SLline

WITH SLine DO BEGIN

IF SLine.FIND(’-’) THEN BEGIN
REPEAT

//////Start of Invoice Discount Calculation for Sales Lines

IF ( (GLine.“POS Order No.”= SLine.“Document No.”) AND (SLine.“Inv. Discount Amount”>0)
) THEN BEGIN

CASE GLine.“Payment Method Code” OF
‘CASH’:
BEGIN

BycashtotalInvdiscountSL:= BycashtotalInvdiscountSL+SLine.“Inv. Discount Amount”;

END;

‘CREDCARD’:
BEGIN

BycredittotalInvdiscountSL:= BycredittotalInvdiscountSL+SLine.“Inv. Discount Amount”;

END;
ELSE BEGIN

ByothertotalInvdiscountSL:= ByothertotalInvdiscountSL+SLine.“Inv. Discount Amount”;

END;
END;
END;

//////End of Invoice Discount Calculation for Sales Lines

//////Start of Line Discount Calculation for Sales Lines
IF ( (GLine.“POS Order No.”= SLine.“Document No.”) AND( SLine.“Line Discount %”>0)

) THEN BEGIN
CASE GLine.“Payment Method Code” OF
‘CASH’:
BEGIN

BycashtotalLinediscountSL:=BycashtotalLinediscountSL+SLine.“Line Discount %”;

END;

‘CREDCARD’:
BEGIN

BycredittotalLinediscountSL:= BycredittotalLinediscountSL+SLine.“Line Discount %”;

END;
ELSE BEGIN

ByothertotalLinediscountSL:=ByothertotalLinediscountSL+SLine.“Line Discount %”;

END;
END;

END;

//////End of Line Discount Calculation for Sales Lines

UNTIL SLine.NEXT<=0;

END;

END;

////////////////////End of SLine

END;

UNTIL GLine.NEXT<=0;

END;

END;

///////////////////////////////// End of General Journal Line

/////////////Start of Sales Header
WITH SaleH DO BEGIN

REPEAT

IF(SaleH.“Transportation Fee”>0) THEN BEGIN

totaltransporation_unpostedH:= totaltransporation_unpostedH+SaleH.“Transportation Fee”;

END;

IF (SaleH.“Construction Fee”>0) THEN BEGIN
totalinstallation_unpostedH:= totalinstallation_unpostedH+SaleH.“Construction Fee”;
END;

UNTIL SaleH.NEXT<=0;

// END OF WITH
END;

//////////////Sales InVoice Header

WITH SaleInH DO BEGIN
REPEAT

IF(SaleInH.“Transportation Fee”>0) THEN BEGIN

totaltransportation_postedH:= totaltransportation_postedH+SaleInH.“Transportation Fee”;

END;

IF (SaleInH.“Construction Fee”>0) THEN BEGIN
totalinstallation_postedH:= totalinstallation_postedH+SaleInH.“Construction Fee”;
END;

UNTIL SaleInH.NEXT<=0;

// END OF WITH
END;

////////////// End of Sales InVoice Header

totalcash:=totalcash_posted+totalcash_unposted;
totalcredit:=totalcredit_posted+totalcredit_unposted;

totalother:=totalother_posted+totalother_unposted;
totaltransporation:=totaltransporation_unpostedH+totaltransportation_postedH;
totalinstallation:=totalinstallation_unpostedH+totalinstallation_postedH;

here is my code.

i need only one time gl entry post order no. and filter according to posting date.