views:

150

answers:

3

Hi all... I could've sworn there was a way to do this (without DLLs), but going through the first several pages of google, I can't find it. Maybe I'm thinking of something else.

I'm having to do some development in Crystal Reports 8.5. I thought there was a way to write custom functions. Something like creating a custom formula then writing a function in the code of the formula and putting the formula field at the top of your report, making it then available to anything else needing it.

Was there not a way to do this?

+1  A: 

Maybe you are thinking of what I believe is called the Custom Function Repository, which I think can only be used with Crystal Enterprise. Truthfully I do not have any experience with it I just figured I'd throw out the term for you for something that you could look up.

Also, I know that you can share formula values across the report (to sub reports and such) with the use of global or shared variables, but I'm not sure about formulas themselves.

Hope this helps. :)

Dusty
Hmm... could be. Unfortunately we are not using Enterprise. I'm always amazed Crystal managed to become the default report builder, it's got SO many flaws and limitations! LOL
eidylon
It was all they had until they made there own (SSRS). I think they are slowly getting people to migrate over for better or for worse. I don't hate Crystal, but it has it's issues like any software. I think it works well with some projects, but others it just creates head aches and makes people want to pull there hair out. Maybe that's why I'm starting to go bald. haha
Dusty
coupled with the fact that no developer actually likes writing reports. CR is an easy target/punching bag/dart board/etc...in ten years everyone will be complaining about how shitty SSRS is.
dotjoe
Meh, I'm not even on SSRS... never had the occasion or desire to learn that one. For new development I'm actually looking at Telerik's reporting control. Just gotta go get the time to evaluate and test it out. Looks good though. I agree though, report writing sucks major shoe! I can't stand how the designer in Crystal (at least in 8.5) is SO picky, when you're doing layout, if you're off the grab handles by even one pixel... it's so freakin' picky and anal!
eidylon
@eidylon - While your testing stuff out, look into DataDynamics Active Reports also. It's pretty good and I think cheaper than Telerik. I've never used Telerik so I don't know how Crystal, Microsoft Reporting or Active Reports stacks up against it. I like Active Reports for projects where I have control over the data you give to the report, but I like Crystal for projects where I have to report off of something that I didn't create. Crystal gives more functionality within the report itself.
Dusty
A: 

Formulas can reference other formulas, allowing you to subdivide and reuse work, the same way that functions can call other functions in a programming language. Are you needing something special?

Dewayne Christensen
There's a report which takes in a string in several parameters and parses them as dates. They come in as YYYYMMDD. I wanted to try to avoid rewriting the same parsing code in multiple places for each parameter.
eidylon
+2  A: 

Not sure about 8.5, but I'd guess it'd be somewhere in the formula editor like it is in 11.5 designer. Report Custom Functions is right above the Repository Custom Functions in that treeview.

dotjoe
+1 This does look like what you're looking for. I don't do many things with subreports so I guess that's why I haven't seen this before now. I don't generally need to share the formula across the report. I would find it useful to share the report across a server which is what I think the Repository is for, but I haven't messed with that either.
Dusty
lol, are you thinking of something else? The custom functions are simple functions you can reuse throughout a report's formulas. You can't access any fields from inside these functions. I've used them a couple times to keep redundant formulas somewhat DRY.
dotjoe
+1 Even though I have answered the question also, I think this answer is what you are looking for. It gets my vote. :)
Dusty
Yah, 8.5 doesn't have that. And we have never upgraded corporately due to altered licensing after 8.5 or something like that. Oh well.
eidylon
that sucks...looks like a lot of copy/paste is in your future :(
dotjoe