Print Page | Close Window

How to make a global function

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17913
Printed Date: 05 May 2024 at 1:51am


Topic: How to make a global function
Posted By: gbritton
Subject: How to make a global function
Date Posted: 02 Nov 2012 at 10:56am
I have a Crystal report that contains several subreports. Several of them use similar logic in their functions, so I made a user function that I can call. However, I need to make this function available to all the sub-reports. Currently it is only visible in the Top-level report. If I try to use to my new function in a sub-report, I get an error message.

What should I do to make my function visible from the sub-reports?



Replies:
Posted By: kevlray
Date Posted: 05 Nov 2012 at 10:57am
I know that if you have the BO Enterprise then you can put the formula in the repository and it is available for all reports.  If you do not have the BO Enterprise, then I am not sure if it possible.  There was a time when we were unable to use the repository, I did a lot of copy and paste.


Posted By: gbritton
Date Posted: 06 Nov 2012 at 2:57am
OK! I'll give that go! In the meantime, here's a related question:

In a report as described above, will a global variable in the top-level report be visible to the sub-reports? If so, I might have a second way to do things.


Posted By: kevlray
Date Posted: 07 Nov 2012 at 10:56am
It has to be a shared variable.  I have not tried using a shared variable in more than one sub-report, thus I do not know if there is anything you need to watch out for.



Print Page | Close Window