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!

Use formula fields across reports?

Status
Not open for further replies.

rhammond

Programmer
Dec 9, 2002
21
US
I have several formula fields that I've constructed that I will use on many reports. Is there an easier way to insert them into a new report other than opening another report that has them, then copying/pasting? Perhaps there's some sort of tool for "sharing" them across reports?

Thanks,
Rebecca
 
I can't always remember which reports have which formulas so I maintain a Word document with the formulas that I keep open when working with Crystal. I copy and paste from that.
 
Actually, you can copy and paste a formula from report to report if you have both reports open. From the source report, just right click the desired object and select copy, go to the destination report and right click and select paste.

As long as the field names are the same the formula will work. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
If you are using the old Crystal Dictionaries, you can have common formulas in the DC5 file, but only if the formula could have been written in CRv5 (no newer functions are available).

Starting with v9 you can store custom functions in the repository. This can hold the logic of your formula, but not the specific fields it uses. You would have to put the fields in each time. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Ken - actually, I thought of the Crystal Dictionary solution last night...I've been playing with it today, and although I do have formulas that couldn't be written in v. 5, I can still create them - it tells me that they're wrong when I save, but I save anyway, and they seem to function correctly. Or is this just an illusion?

Thanks,
Rebecca
 
I remember experimenting with this, and I remember that I could fool it into accepting one formula, but then the second formula would somehow mess up the first one. I don't remember the details but I seem to remember that you could monkey with the formulas to get it to work, but it was flaky.

One problem is that a dictionary report can never be converted to a regular report. Another problem is that CR seems to be moving away from the dictionary idea. I guess not improving the code for 5 years was supposed to be a clue. The dictionary is now not included with v9, and must be downloaded. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top