Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Couple easy (?) questions

Status
Not open for further replies.

nblankton

Programmer
Feb 17, 2004
3
US
I am new to Crystal, so please forgive my basic questions.

I'm working on an invoice report that needs to look something like this:

Contract Name
Product Name 1 Product Price 1
Task 1 Time Spent 1
Task 2 Time Spent 2
Product Name 2 Product Price 2
Task 3 Time Spent 3
Task 4 Time Spent 4

---------------------------------------------------
Total Price

The problem I'm running into is that the total is adding the product price once for each task rather than once for each product. How can I have the task count not affect the price sum?

Also, how do you change the color of an entire row?

Thanks for any help.
 
The reason you are getting an inflated total price is because you created a sum on a field that is being returned in very row from the database.

There are sveral ways to eliminate. Since it looks like you need this in the Group Header, you can not use a Running Total. Create this formula and place it in the Product Name Header:

@Product Price
Code:
{table.product_price} //replace this with your price field

Now create a summary off of this new formula and use it instead of the one you are using now.

To change the background color, choose Format, Section.
Highlight the Details section.
Click the Color tab.
Pick a color from the list.

~Brian
 
Thanks for the response. I was able to change the row color.
I tried your suggestion for fixing the summary field and it still seems to sum incorrectly. I created a formula field based on the price, placed it in the Group Header #1 row, then created a "sum" summary on this formula and placed it in the Group Footer #1 row. Still sums based on the number of rows in the "Details" subgroup.

Here's a description of my layout if that helps:
Report Header
Page Header
Goup Header #1 - contract.contractid A
Group Header #2 - contractdetail.title A
Details a
Details b
Group Footer #2
Group Footer #1
Report Footer
Page Footer

Any other suggestions?
 
You use different terms to describe the same thing, and post nothing technical about the environment (version of Crystal, database) nor the data, hence the lack of a quick and simple answer.

Is this the product price, or a sum of the price (you use both descriptions and they generally are not the same thing)?

Just place the price field in the group header if you want the price, if you need a sum, describe what this sum is if it isn't at the detail level.

-k
 
I apologize. I'm trying to provide as much info as possible.

I'm using CR 9.2.4.77 feeding from Microsoft CRM.

The CRM data looks like this:
Contracts (displaying title, client, dates)
--> Contract Details (displaying name of product, hours allocated, hours used, and price)
--> Incidents (displaying name of incident, resolution, time involved)

The summary involves the contract detail price. So the individual price is displayed in the Group Header #2 and the sum is displayed in the Group Footer #2. However, it is being summed for each Incident under the Contract Detail.

I hope this clarifies it a bit.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top