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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection Question

Status
Not open for further replies.

knagy

Technical User
Apr 6, 2005
13
US
I am using Crystal 8.5 with a Timberline database. I have written a report and am using the select expert to select the contracts that I need. I am using all of the data from the contracts to give me the body of my report. However, I need to pull one of the items from one of the contracts and put it in a specific spot. For example:

Hard Costs Cur Est Billed Paid
General Requirements 160,192 20,354 20,354
Total Construction 1,576,598 138,646 138,646

Builders Overhead 155,955

In this example, the General Requirements and the Total Construction lines are subtotals in the Group Footers. The Builders Overhead number is included in the Total Construction line, but I need to pull it out to do a calculation that management wants. The item is assigned to a Cost Code, but I can't get the formula right to show the Current Estimate for just that cost code. Can this be done using a formula? Thanks in advance for any help.
 
What makes a value a "builders overhead" as oppossed to a "general requirement". If you can determine this based on the value of a field in your database, then yes you can write a formula for it.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Each item has a unique Cost Code. So items with a cost code that starts with 01XX would be general requirements and a cost code that starts 21XX would be builders overhead.
 
Then how are these 2 components of cost being grouped together right now? How are you grouping?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
You should be able to create a formula like the following to be placed in the detail section:

if {table.costcode} startswith "21" then {table.amt}

Then right click on this formula and insert a summary at the grand total level.

-LB
 
knagy, are you saying that you identify items for a contract using part of the code, and also determine what they are using another part? In that case you need to separate the items. Maybe Left({Cost Code}, 1) for the type and Mid({Cost Code}, 2, 3) for contract.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
I'm not sure I am explaining this correctly, so please bear with me. I use the selection expert to pick what contract I use. Then within each contract are contract items that have a group code and a unique cost code. In my report, I have the details hidden (the cost codes) and group on the group code as well as grouping on the contract number. So in each group, you may have from 1 to 20+ items. The particular line I am talking about (Builders Profit) happens to have only one item in it. In other words, if you were to drill down on the subtotal it would show 1 detail item, while the line General Requirements would produce several items. In my orignial question, the Builders Profit figure was in the Total Construction line, however, since that time, management has decided the would like to see it as a group total, so I have assigned it a unique group code. I still need to use the Builders Profit figure in a calculation below the main report and can not figure out how to pull just that group code or cost code (since there is only one item) and show it below. I tried to paste a picture of my report but was unable to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top