473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Crystal Reports - Setting up a one-to-many relationship in a crystal report

Stu
Hi there,

I am trying to set up a Crystal Report with the following tables:

Customer Info:
-Name
-Address
-CustomerID

Orders:
-CustomerID
-Order value ($)

I have N customers and each customer has M Orders. I need to display
the Customer Info for each customer, followed by a graph for each
customer's order values. I have defined a schema for the tables and
connected them with Crystal Reports Database Expert.

In order to do this, I have set up a Group in Crystal Reports based on
the Customer Name. In the footer of each group, I add a table that
displays the order values of the customer's orders.

This works fine, except for the fact that in the details section of
each group, the Customer info is repeated once for each Customer
Order. Obviously, I just want the Customer Info displayed once.

Is there a way to define a relationship like this? When I use the
Database Expert, I don't see any way to indicate that this is a
one-to-many relationship.

I am using Crystal Reports 10.

Any suggestions?

Thanks,
Stu
st**********@hotmail.com
Jul 21 '05 #1
2 6337
PJ
Stu,

Move all of your customer info to the group header or format each field with
the suppress if duplicate option checked.

PJ
"Stu" <st**********@hotmail.com> wrote in message
news:23**************************@posting.google.c om...
Hi there,

I am trying to set up a Crystal Report with the following tables:

Customer Info:
-Name
-Address
-CustomerID

Orders:
-CustomerID
-Order value ($)

I have N customers and each customer has M Orders. I need to display
the Customer Info for each customer, followed by a graph for each
customer's order values. I have defined a schema for the tables and
connected them with Crystal Reports Database Expert.

In order to do this, I have set up a Group in Crystal Reports based on
the Customer Name. In the footer of each group, I add a table that
displays the order values of the customer's orders.

This works fine, except for the fact that in the details section of
each group, the Customer info is repeated once for each Customer
Order. Obviously, I just want the Customer Info displayed once.

Is there a way to define a relationship like this? When I use the
Database Expert, I don't see any way to indicate that this is a
one-to-many relationship.

I am using Crystal Reports 10.

Any suggestions?

Thanks,
Stu
st**********@hotmail.com
Jul 21 '05 #2
Bob
Hi Stu,
You may like to define a view in the database that gives you the detail data
that you want. This will give better performance than sucking in the raw
table data.
ie.
Create a view with:
Select customer.name,order.id,order.value from customer inner join order on
customer.id=order.customer.id
This will give a recordset which you would group on Customer.name
You would only place order.id and order.value in the detail section.
Then place your graph in either the group header or footer as required.
HTH
Bob
"Stu" <st**********@hotmail.com> wrote in message
news:23**************************@posting.google.c om...
Hi there,

I am trying to set up a Crystal Report with the following tables:

Customer Info:
-Name
-Address
-CustomerID

Orders:
-CustomerID
-Order value ($)

I have N customers and each customer has M Orders. I need to display
the Customer Info for each customer, followed by a graph for each
customer's order values. I have defined a schema for the tables and
connected them with Crystal Reports Database Expert.

In order to do this, I have set up a Group in Crystal Reports based on
the Customer Name. In the footer of each group, I add a table that
displays the order values of the customer's orders.

This works fine, except for the fact that in the details section of
each group, the Customer info is repeated once for each Customer
Order. Obviously, I just want the Customer Info displayed once.

Is there a way to define a relationship like this? When I use the
Database Expert, I don't see any way to indicate that this is a
one-to-many relationship.

I am using Crystal Reports 10.

Any suggestions?

Thanks,
Stu
st**********@hotmail.com

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: scott cooper | last post by:
I hope this illustrates my question a little better. Consider the following script; why does the client side script change the div object's innerHtml property but the server side script does not?...
2
by: Wayne | last post by:
I'm having trouble sending snapshots of reports using SendObject on my desktop machine but the code works fine on my notebook. I don't think that it is a coincidence that "Mailwasher" - a mail...
2
by: B. L via AccessMonster.com | last post by:
I have a Database with a Simple Switch board and multiple reports and forms. All of a sudden When i go and open up the database it says it can't find my forms or reports, but the tables and quiries...
13
by: MLH | last post by:
I have a number of reports that are essentially black 'n white prepared forms (picture an IRS form 1040). The data fields are overlaid onto the report fields in the correct positions and I would...
1
by: cb | last post by:
I've built a linked database with a series of reports that has a control which contains a field divided by the sum of a subreport field. This calculated control works on my home computer and on a...
1
by: ramesh_tankala | last post by:
hi... i generate reports in excel sheet through vb6, How i can change the excel sheet page settings through vb6
5
by: Axel Gallus | last post by:
In IE , there is a setting in EXTRAS->OPTIONS->SECURITY->INTERNET->CUSTOM SETTINGS->SCRIPTING-> ALLOW ACCESS ACROSS DOMAIN BOUNDARIES Does this really affect the Sandbox, respectively "same origin...
0
by: jai83 | last post by:
hi, How can Stored procedures be used in oracle reports for creating reports instead of SQL queries? Thank you.
0
Ali Rizwan
by: Ali Rizwan | last post by:
Hi I have a problem with Reports. When i update data using adodc and reports are binded with DataEnvironment the reports does not updates the data but data is updated in database. How can i...
4
by: MLH | last post by:
How do I ensure my reports are being printed in max resolution of 1200dpi ? That is, can Access control the setting?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.