Options

Group footer value in rdlc report

thankeshthankesh Member Posts: 170
edited 2013-09-05 in NAV Three Tier
Hi,

I have a new report for inventory and sales details. The report details are as follows.

1. The report has the list of filters. (a) variant code (b) Fromdate (c) todate - From request form
2. The report has two data items. (a) Item (b) Item ledger entry - indended to each other with data item links
3. The report should show the list of values.
(i) soldqty - sum(qty) from ILE table where "Entry type" = "sale"
(ii) receivedqty sum(qty) from ILE table where "Entry type" = "purchase"
(iii) beginqty - This should be the sum(qty) from ILE table where "posting date" before the fromdate

Now the issue is with the rdlc. While using the datasetfields from the report and designing using rdlc, the (i),(ii),(iii) values are showing wrong values.

I tried the following possibilities:
Created new layout, 1. with a group footer/group header - Grouping based on "Item No."
2. with a table detail - Grouping based on "Item No."
But, I failed to got the correct outuput.

Pl find my code below:

Item Ledger Entry - OnPreDataItem()
V_BeginQty := 0;
V_Received := 0;
V_Sold := 0;
V_Adj := 0;
V_EndQty := 0;

RefDate := CALCDATE('<-1D>',V_FromDate);
IF Variantcode <> '' THEN
SETFILTER("Variant Code",Variantcode);

Item Ledger Entry - OnAfterGetRecord()

IF ("Posting Date" < RefDate) THEN
V_BeginQty += Quantity;

IF ("Entry Type" = "Entry Type"::Purchase) AND (("Posting Date" >= V_FromDate) AND ("Posting Date" <= V_ToDate)) THEN
V_Received += Quantity;

IF ("Entry Type" = "Entry Type"::Sale) AND (("Posting Date" >= V_FromDate) AND ("Posting Date" <= V_ToDate)) THEN
V_Sold += Quantity;

IF ("Entry Type" = "Entry Type"::"Positive Adjmt.") OR ("Entry Type" = "Entry Type"::"Negative Adjmt.") THEN
IF (("Posting Date" >= V_FromDate) AND ("Posting Date" <= V_ToDate)) THEN
V_Adj += Quantity;


V_EndQty := V_BeginQty + V_Received - V_Sold + V_Adj;


Pl do the needful.
With warm regards,

Thankesh

***Learn to lead***

Comments

  • Options
    deV.chdeV.ch Member Posts: 543
    Have you tried setting the Last() Function around your Value expression in the RDLC Layout textbox?

    Instead of
    =Field!YourField.Value
    write
    =Last(Field!YourField.Value)
  • Options
    thankeshthankesh Member Posts: 170
    It works!!! thank you so much...

    I have table header, Group footer in my rdlc design. But, the report shows a blank line on the first row unnecessarily.
    With warm regards,

    Thankesh

    ***Learn to lead***
  • Options
    Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    thankesh wrote:
    It works!!! thank you so much...

    I have table header, Group footer in my rdlc design. But, the report shows a blank line on the first row unnecessarily.

    Have you set any visibility property for that line?
    ~Rik~
    It works as expected... More or Less...
  • Options
    thankeshthankesh Member Posts: 170
    No. I have not set any visibility property. :-k
    With warm regards,

    Thankesh

    ***Learn to lead***
  • Options
    Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    thankesh wrote:
    No. I have not set any visibility property. :-k
    you could try setting it with something like this:
    =IsNothing(Fields!OneofYourFields.Value)
    
    ~Rik~
    It works as expected... More or Less...
  • Options
    Karthi37Karthi37 Member Posts: 1
    Thank you dev.ch that last followed by the value in the text box layout did the trick.. :):)
Sign In or Register to comment.