473,785 Members | 2,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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**********@ho tmail.com
Jul 21 '05 #1
2 6368
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**********@h otmail.com> wrote in message
news:23******** *************** ***@posting.goo gle.com...
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**********@ho tmail.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,o rder.id,order.v alue from customer inner join order on
customer.id=ord er.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**********@h otmail.com> wrote in message
news:23******** *************** ***@posting.goo gle.com...
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**********@ho tmail.com

Jul 21 '05 #3

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

Similar topics

4
4703
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? Debug reports that the server script does not see the document's div object but I thought I read that varibles created with page scope are available throughout the page. <%@ language="VBSCRIPT" %> <html> <head>
2
1345
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 previewing application, doesn't know that Outlook is the default email program. Once again all is fine on my notebook. It would appear that Access also doesn't know that Outlook is the default email program and this is causing the failure when I...
2
1730
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 are still there. This just happend the other day. So i copied the forms and reports from a back up i had. It worked for a day, then it happend agian. It is on a server with about 3 people using. Your Ideas would HELP!!
13
1870
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 to empower the user to use blue/red/black - maybe more - as the forecolor property for the textbox controls holding data so that the black & white forms will have all the printed data shown in the desired color. I put a textbox control on the...
1
1342
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 workstation I do design work. It also worked just fine on my client's intranet linked version for the last 4 months. The control source is =/!!.Form.Controls!Expr1 However recently my client, using the same exact reports and data ( I've zipped...
1
1951
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
1893
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 policie" of IE? I allowed access across domain boundaries, but it did't help me at all. What i wanted was to access the innerhtml of a frame showing a foreign domain.
0
1024
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
913
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 solve this problem
4
1878
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
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9947
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.