Group footer value in rdlc report
thankesh
Member Posts: 170
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.
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***
Thankesh
***Learn to lead***
0
Comments
-
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***0 -
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...0 -
No. I have not set any visibility property. :-kWith warm regards,
Thankesh
***Learn to lead***0 -
you could try setting it with something like this:thankesh wrote:No. I have not set any visibility property. :-k=IsNothing(Fields!OneofYourFields.Value)
~Rik~
It works as expected... More or Less...0 -
Thank you dev.ch that last followed by the value in the text box layout did the trick..

0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions