Hi to all
I have got a question, is there any possibility of grouping information in the report, without using GroupTotalfields property of the item. The case is, i have to get the report, which runs on the table Item, but with two different groupings. As i understand i can get them sorted as i wish with SETCURRENTKEY, but what then - searched for anything that could group them in the process - but nothing
Does anyon know, whether there is any function capable of that?
If not, then i most probably redesign the thing to work on two different Item's so that it chooses one with the suitable grouping, but still, it would be nice to know, whether there is a possibility.
Would be very glad to here from anyone knowing anything about the matter O:)
Comments
But instead of using "GroupTotalfields", you can write your own coding to do the grouping.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
grupperimine - option type
CASE grupperimine OF
grupperimine::PMAd:
item.SETCURRENTKEY("PMA1","PMA2");
HERE I NEED SOME CODE TO GROUP BY
grupperimine::"Tootja ja hankija":
item.SETCURRENTKEY("Vendor No.","Manufacturer Code","PMA1","PMA3","PMA2","Alkoholi %","Unit Volume")
END;
HERE I NEED SOME CODE TO GROUP BY
Is there any function to tell the navi to group by the fields of the currentkey?? I couldnot find any so far :oops:
Roshan
Start reading your records in a way that goes fast (correct SETCURRENTKEY and SETRANGE), and save the totals in a temptable (grouping by the fields of the SETCURRENTKEY or even grouping by other fields) . Then run your report on the temptable.
Now that you have a temptable with the totals, you can start your report on those temptables.
You need a dataitem on an integer per total-level (so 3 : X,Y,Z). Y must have property "DataItemIndent"=1 and Z property "DataItemIndent"=2
X - OnPreDataItem()
X - OnAfterGetRecord()
Y - OnPreDataItem()
Y - OnAfterGetRecord()
Z - OnPreDataItem()
Z - OnAfterGetRecord()
In the sections, you can use the values of the temptables in the sourceexpresion. Eg. tmpRecord3.Y or tmpRecord3.TotalField1.
And if you want the total TotalField1 for X or Y or Z, use tmpRecord1.TotalField1 or tmpRecord2.TotalField1 or tmpRecord3.TotalField1.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!