I am trying to produce a report with one level of grouping on [Vendor]. Within the group, I need to sort by one field. (either [Project Name] or [Invoice Date]) I can do this by hand if I open the sorting and grouping window and add the desired field as a second Field/Expression (after [Vendor]) and choose ascending.
The problem is that I need to be able to choose the sort order on the form that opens the report. Changing the SQL doesn't seem to help, so I think I need to find a way to dynamically control the actual group level. Can anyone tell me how I could either create a new group level (i.e. creategrouplevel(reportname, "[project name]",0,0)) or modify a preexisting one? (i.e. Me.grouplevel(1) = [project name] or Me.grouplevel(1) = [invoice date])
I can't seem to use creategrouplevel unless I first open the report in design view, change it, then open it in normal view. But this actually modifies the report, which I don't want. I am just lost as to how I can control this through code. Please, if anyone has even the slightest idea, please let me know! thanks!
The problem is that I need to be able to choose the sort order on the form that opens the report. Changing the SQL doesn't seem to help, so I think I need to find a way to dynamically control the actual group level. Can anyone tell me how I could either create a new group level (i.e. creategrouplevel(reportname, "[project name]",0,0)) or modify a preexisting one? (i.e. Me.grouplevel(1) = [project name] or Me.grouplevel(1) = [invoice date])
I can't seem to use creategrouplevel unless I first open the report in design view, change it, then open it in normal view. But this actually modifies the report, which I don't want. I am just lost as to how I can control this through code. Please, if anyone has even the slightest idea, please let me know! thanks!