SAP Crystal Reports 2016 Support Pack 3, Crystal Reports Enterprise 2016
It only took a month. IT had to install visual studio, databases tools, Enterprise tools, repository and a host of other things. He spent a lot of time on the phone talking to People from India who didn’t know enough to help him.
Alright, so now I have a working login to the repository. If you remember, I wanted to add my custom functions to the repository so that if I have to change them in the future, I can change them in one place and fix all of my reports. This part is easy, just go into the formula workshop, right click on the custom function and select ‘Add to Repository‘. Once that’s complete, I see the functions are listed under ‘Repository Custom Functions‘. In addition, they’re still listed under ‘Report Custom Functions‘, where they’ve gained a little cable image to indicate that they’re linked to the Repository. Cool.


Next, I already have several labels that use the same custom functions (via copy + paste), I want to update all of them to use the repository functions instead. It took me a bit to figure this out, but it’s actually really simple: Right click on the Repository function and select ‘Add to Report‘.

Crystal reports detects that there’s already a custom report with that name and gives me this popup:

And I choose yes.
Alright, so now all of my labels are using the repository function. What if I have to change the repository function? Let’s try it out. I’m going to add a comment to my MisData function.
I’m in a label file called ‘StandardCustomerLabel’. In the formula workshop, I right click on the Report custom function and select ‘Disconnect from Repository‘. The little cable goes away, and I can now edit the custom function. When I’m done, I right click it and select ‘Add to Repository‘. It asks me if I’m sure and I say yes. Once again the little cable shows up next to my report custom function.
Now I save and close that label file and go into a second label file named warehousewip. I pull up the formula workshop and I see that the comment I added is there in the Repository custom function:

But unfortunately, it’s NOT visible when I click on the Report custom function. Well, Huh. How do I get it to synchronize? One internet search and I find out that there’s a setting I want to change, which will make it so that when I open a report, it will retrieve any functions from the repository:
https://archive.sap.com/discussions/thread/1496729
Don’t forget to save it if you want the changes to stick.
I’m a little bummed about this. Eventually I’m going to be using these function in over 150 reports, and every time I change it, I have to re-open all of them and then save them? It’s a bit of a pain, but at least I don’t have to go into the formula manager, select the formula, and paste for each one. But what can I do about it? My application that’s using the labels would have to read the label, determine that the label uses a repository, access the repository and download the latest version of the function and then recompile the label. It doesn’t have the permission to do any of that, and even if it did, it would be a horrible waste of time if the formula hasn’t changed. So that’s not an option. What if Crystal reports updated all the labels automatically? Well, I’m just saving the labels on my hard drive. Crystal reports doesn’t know where they are. Perhaps if I were to check the reports themselves into the repository, then it could. I think this is possible, but I have no idea how to do it at this time. If I decide to go that route, it could be the topic of another blog post.