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

CR9.0 Repository - Can formulas be added? 1

Status
Not open for further replies.

jenschmidt

Programmer
Sep 30, 2002
145
US
Hi there! I was wondering if there is a way to add formulas to the repository. I can only see that it allows Text objects, images and commands.

Thanks!

jennifer.giemza@uwmf.wisc.edu
 
per the user guide. The only objects supported are Text Objects, Bitmaps, Custom Functions, Commands (queries)

You might want to paste the formula in a text object then store it with a good name. When you need this add the object to the report, copy and paste the contents in the formula, then remove the text object. Kind of a kludge, but might work for you.



Cheers,

SurfingGecko
Home of Crystal Ease
 
Thanks so much for your help!

jennifer.giemza@uwmf.wisc.edu
 
You can store a formula's logic in a function, which is almost the same (often better). The difference is that a function has input values instead of hard coded field names in the formula. CR can even convert any formula into a function by replacing all of the field names with inputs variables.

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
 
So do you then have to reference the function in another formula? Mostly, we were looking at the ability to change the formula in one place and have it affect all the reports the formula was in - so even if we had to reference the function in another formula, that would still give us the flexibility.

Thanks!


jennifer.giemza@uwmf.wisc.edu
 
Yes, you use the function in formulas. When you update the function logic, it updates all of the formulas that use that logic.

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
 
Has anybody successfully modified a custom function from the repository? I tried disconnecting the custom function from the repository, then modifying it, the adding it back in but my changes never get saved.

Can anybody help?
 
I have found that my changes get saved to the repository, but I noticed yesterday that other reports that use the updated function don't automatically see the update. I had to re-add the function to each report to get it to see the change. I must be missing something because that can't be the intended behavior, but I haven't had a chance to play with it yet.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
I found the setting that controls the behavior above. Under File-Options, the reporting tab, there is a check mark that tells CR to update connected repository objects when loading reports. This is a global setting on each PC.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Thanks for the feedback!

It wasn't obvious too me but I had to close the report and then open it back up for the report to pickup the repository changes. I wish the report would pick up the changes if I re-ran it w/o having to re-open it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top