Grouping in reports with options

semaasemaa Member Posts: 26
Hello,

I am trying to prepare a report for our customer.
The report has only one data item.
And I want to make grouping optionally.
For example, I have these fields in my data item

Channel
Customer No
Main Cat.
Cat.
Sub Cat.
.
.
.

I want to group the report according to channel, customer no, main cat.,
cat. and sub cat. fields. no problem with these grouping process. I succeded it.
but the problem is that our customer wants to grouping with options. i mean, there will be 5 check boxes on request form and the grouping will be done according to his choise. if only choose channel grouping will be according to channel, if he chooses Customer No and Sub cat. then grouping will be with these fields.

If anybody have any idea please share with me.

Best wishes


Sema

Comments

  • krikikriki Member, Moderator Posts: 9,118
    I suppose each group has it's section on the report.
    In this case, put in the different "OnPreSection"-triggers some code:

    In the "Channel"-group section:
    CurrReport.SHOWOUTPUT(blnGroupByChannel);
    

    In the "Customer No."-group section:
    CurrReport.SHOWOUTPUT(blnGroupByCustomerNo);
    

    and so on...
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • semaasemaa Member Posts: 26
    hello,
    i tried this but it did not work. i created group headers for all the grouping options and used the
    CurrReport.SHOWOUTPUT function.
    but i just want to group by category report groups the records as other options are selected. it recognizes other options.
  • navisi0nenavisi0ne Member Posts: 36
    You should also change key. e.g. if they need to group by category, you have to use a key where category is the first field in the key.
    Take a look at GroupTotalFields help:

    Comments
    When records are retrieved, they will be grouped by the contents of the fields that are defined as the GroupTotalFields. If there is more than one field in the list, the groups will be nested. This means that there will be a group composed of records that have the same contents in the first field indicated. Inside of this group, records will be grouped according to the contents of the second field in the list, and so forth.

    When using GroupTotalFields, you must be aware of the relationship to the currently active key of the underlying table. See the example below.

    ....
Sign In or Register to comment.