cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Function Causing Crashing

I created a custom function and ever since then the entire application crashes when inside the formula editor. I thought maybe it was a problem with the function so I managed to save it as this:

Function ()
""

It should not be causing a problem at this point. The application crashes 100% of the time if I click on the custom function once to open it and then a second time. It also crashes 100% of the time if I right click on the function. It's really annoying and I just want to delete the function but the option to delete it is grayed out on the toolbar and like I said, the application crashes when I right click on the function. See Crystal Reports version info below.

I have the same problem (. The version is also the same.

0 Kudos

The same problem 😞 CR2020 closes without any error message as soon as you try to expand the Report Custom Function node

Accepted Solutions (1)

Accepted Solutions (1)

Correct, you can't edit the function from the Formula Fields list box.

Expand Report Custom Functions and then it will list what you see in Formula Fields.

Click on the function and the editor opens up:

0 Kudos

Hi Don,

That was the point of this issue. Before the Service Pack 1 Patch 2 was installed, the Crystal Reports 2020 crushed when a function was being selected in the Expanded Reports Custom Functions section. Now it works correctly. Thank you.

Answers (4)

Answers (4)

peter_r
Explorer

Service Pack 1 Patch 2 solved this problem for me.

Peter

0 Kudos

Thanks a lot, Peter!

Max

0 Kudos

Indeed, after installing all the patches - the problem has gone! Peter, thanks!

0 Kudos

Hi Max,

Thanks, that helped a lot...

#8 - It works for me:

I am using SP 1 though...

See if upgrading to SP 1 resolves your issue:

https://origin.softwaredownloads.sap.com/public/site/index.html

If it doesn't I would check your install, be sure to install CRD under a local Admin account.

And check your Anti-virus logs, it could possibly be blocking access to something CRD needs.

Try adding crw32.exe to the trusted list and the folders also:

C:\Program Files (x86)\SAP BusinessObjects

Don

Hello Don,

Thanks for your quick reply. In my previous steps

I meant the very left tree, there you should expand the Report Custom Function node (marked with Red mark).

After that, you should select the crf_test item to view its code.

As for the SP1, thanks a lot, I'll try to install it these dayoffs and let you know the result.

Best regards, Max Barybin

Hello Don,

Unfortunately, the Support Pack 1 DOES NOT solve this issue.

The problem still exists.

Please, read my previous comment to reproduce it. Pay special attention to the tree with Red mark.

Best regards, Max.

0 Kudos

Indeed, the installation of Support Pack 1 does not solve the problem with custom report functions!!!! It is still impossible to edit them.

0 Kudos

Hello,

Some steps seem to be missing, I can't add a "function".

How are you connecting to Oracle, ODBC, CR Native Oracle or OLE DB?

Are you using a Command Object to enter the SQL into or is it something on the Oracle you are using?

Is that function referring to an Oracle Function?

And connecting to Dual where did this field come from?

({Команда.S_FIELD});

Don

Hello Don,

Let's simplify the steps. This time, it is without any connections to data sources...

1. Create a blank report. On prompting to select a data source connection just press Finish.

2. Create new formula, enter any valid name, f.e. fr_new.

3. When the formula editor window is opened, right click on the Custom Report Functions and select Create... option.

4. Enter any valid name, f.e. crf_test and add there f.e. this code

Function()
(
  'test crf result';
);

then Press Save button in the formula editor window

5. Edit the fr_new formula, by adding

crf_test;

then Press Save and Close in the formula editor window.

6. Add the newly created formula fr_new to your blank report. The string test crf result will be displayed on the report preview.

7. Now, edit fr_new. When the formula editor window is opened, select your custom report function crf_test from the left tree.

8. The text of this function will be shown for a couple of seconds and CR 2020 is closed without any messages.

Hope it will help you to reproduce this issue.

Best regards, Max Barybin

0 Kudos

CR 2020 is a 64 bit only version, meaning your custom function may need to be update to that platform.

Hello Don,

Thank you for your reply, but, unfortunately, there is the real problem with this functionaly in CR2020. Here is a step-by-step description to reproduce it.

1. Create an empty report.

2. Add a simple query from any Oracle DS. In my case it was "Select 'test' as s_field from dual"

3. Add this field to this report layout. We see 'test'.

4. Add a new formula to this report. For example: fr_new. A formaule editor window will be opened. There we add a custom report function, f.e. crf_test. Here it is its code:

Function (StringVar c_in)
(
  StringVar c_out;


  c_out := 'test crf result';
);

5. Add to your data fomula fr_new

crf_test ({Команда.S_FIELD});

6. Save and Close the editor.

7. Place this data formula to the layout.

8. Now there are two labels - 'test' and 'test crf result'

9. Edit the fr_new formula. The formula editor is opened.

10. Select your custom report function crf_test from the left tree.

11. The text of this function will be shown for a couple of seconds and CR 2020 is closed without any messages.