Is it possible to specify grouping while creating Report Using Temp Table

Hi,

I need to create a report using temporary table. I have defined the Data Item as an Integer. Is it possible to Specify Grouping in the report? I need to group the report based on a field from Sales Header. Please help.

On the OnPreDataItem trigger
SETRANGE(Number,1,TempSalesHDR.COUNT);

OnAfterGetRecord
IF Number = 1 THEN
  TempSalesHDR.Find('-')
ELSE
  IF TempSalesHDR.NEXT = 0 THEN
    CurrReport.BREAK;

Thanks

I am able to specify Grouping in RTC, but only problem is with the Classic client report.

Hi,

You cannot add any Grouping to the Integer Data Item so you will need to use Code to make all the Grouping.

Thanks Ziad.

OR

you can add a dedicated key / index to the Sales header table.

[:)]

Adding a key to the Sales Header table will not allow you to group a dataitem that is based on Integer