RTC Total Problem

haryramaniharyramani Member Posts: 48
edited 2013-02-26 in NAV Three Tier
Hi,

i have a report scenario where i have something like this

Service Contract Header->Dataitem 1
Service Contract line->dataitem 2
(where i link it by contract type and contract no.)

In sections i add certain fields for header->Customer No. , Annual Amount
and Line->item No,description..
At footer i need the sum for annual amount...
Now in classic everything working fine but in RTC my sum of the annual amount is not coming correctly...
NOTE: 1)If i have only service header ALONE IN SECTION the sum is coming correctly
as soon as i add a field in service line,it is getting changed....
2) My footer i.e the sum of the annual amount must come only in the last page of my report...I tried most of the possibilities with list and grouping..I couldn find a way out...

Can sum1 thrw sum li8 on dis issue.... [-o<

Comments

  • haryramaniharyramani Member Posts: 48
    I have found the cause of the problem...
    My header table is affected with the line table
    So The Annual amount is getting incremented by number of records in line table....
    If i have Annual amount of Rs.1000 in header table and in line if i have 2 records...it becomes 2000 So naturallly my total is wrong.....

    i think it is because of improper grouping...but i tried groupin with all the fields ,but either i miss some data or get multiplied as i said above...
    i couldn find a way to group properly
    Is there any way 2 group without affecting any data or is there any such way Service line table does not affect Header table...????

    Also Table footer gives me the total irrespective of the changes i made in grouping It remains constant ,why so???...
    so i used Page footer but am getting total for evry page seperately i.e if i have 10 pages, the total does not come in 10th page getting in each page.....(After calculating the individual page number only i could find the prooblem ](*,) )
  • haryramaniharyramani Member Posts: 48
    \:D/ \:D/ \:D/ \:D/

    Alas solved the issue myself.....It was problem with grouping....needed 2 different fields 2 group..
    the pblm with total printing on each pages was also solved using the code..
    Public Shared Dim sum as Decimal

    Public Function AddToSum(ByVal unit as Decimal)
    Sum = sum + unit
    End Function

    Public Function GetSum() as Decimal
    Return sum
    End Function
Sign In or Register to comment.