Link to home
Start Free TrialLog in
Avatar of jonnov
jonnov

asked on

Displaying a menu structure via Crystal reports

Hi,

I have just started to use crystal reports and im trying to show a menu via the reports. I was going ok until I found that you can have a subreport with subreport, which leads me to believe that im doing things slightly wrong.

Here are the tables :

Menu
-------
MenuID
MenuName

MenuCourse
--------------
MenuCourseID
MenuID
CourseID

MenuCourseSection
----------------------
MenuCourseSectionID
MenuCourseID
SectionID

MenuCourseSctionDish
--------------------------
MenuCourseSctionDishID
MenuCourseSectionID
DishID
Description
Price

What im looking to do is to represent this data in this format :

MENU
  COURSE
    SECTION
      DISH
       DESCRIPTION      - PRICE

Can some point me in the direction of where to start looking. I have all the tables being pushed from a .net app, im using a xsd dataset based on the stored procuedure that fetches the data structure descrbed as above. I have all the tables linked. I guess what I needed to know is how to make this looping structure in crystal reports with subreports in subreports.

Thanks


Avatar of Ido Millet
Ido Millet
Flag of United States of America image

There is no need for subreports for this.  Simply use 5 levels of grouping.

As a side note, you CANNOT have a subreport within a subreport in Crystal.

- Ido
Avatar of Mike McCracken
Mike McCracken

You only really need 4 groups.  The Description and price will be the details in the DISH group

mlmcc
Avatar of jonnov

ASKER

Im going to need a little bit more information on this, as at the moment im in over my head with understanding CR.

I have added a group. I was kind of expecting it to work a little like subreports, with a detail body that I could use to repeat the grouped rows. But instead all I was supplied with was a group header and a group footer. Unsuprisngly neither of which provide what im looking for.

So I have added the group and selected to group by the MenuID in the MenuCourse table. Can some explain the next step please ?

Thanks
Avatar of jonnov

ASKER

Just to expand a little more : In the detail I have added MenuName and underneath it have tried to add a group - like I would have done with a subreport.
Avatar of jonnov

ASKER

Sorry to keep adding to my own post - but group appears to be working like a group would in a database query, such as a group and sum, but can this give me the structure of :

MENU
  COURSE
    SECTION
      DISH
       DESCRIPTION      - PRICE
  COURSE
    SECTION
      DISH
       DESCRIPTION      - PRICE
  COURSE
    SECTION
      DISH
       DESCRIPTION      - PRICE

Etc
ASKER CERTIFIED SOLUTION
Avatar of Ido Millet
Ido Millet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What Ido suggested is right.
CR group works like a hierarchy display of data.
Just put your Menu Name, Course, Section, Disk in the group header and description and detail section. supperss all group footer will do.
Try play around with the group thing and you will find it is what you want.

good luck~
dylan