cancel
Showing results for 
Search instead for 
Did you mean: 

Report runs in Visual Studio, and in Web Add-On CR Viewer, but not in WinForms CR Viewer Control

Former Member
0 Kudos

I have a Crystal Report that runs fine in Visual Studio preview mode, and it runs in an old Crystal Decisions, Inc. web based viewer control, but in my C# .NET Windows Forms application it throws the error below. Is there any way to get the report to run in the Windows Forms application without editing the report? We have a large number of these reports and it would be a lot easier if we didn't have to edit them all.

CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: Error in formula name 'm ({@Ext_Q_Total}, {T_PRO_DAT.LEI_TEAM}', reserved characters '{', '}', '@', '?' cannot be used in formula name.

Thank you,

Joe G.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Joe,

Correct, CR does add them which is why you cannot use them, something else in the report is causing the issue.

Did you run the app and use the Formula to check all of them?

Don

Answers (1)

Answers (1)

Hi Joe,

Unfortunately no, we added that filter because it was causing problems for the DB engine and Report formatting engine.

Reserved characters are typical for most programs, most are the upper row of the keyboard and should always be avoided when creating names for anything. Even some DB's do not allow those shift characters, for those what we did was use an Alias and replace then with underscores.

The runtime is also available from this link now:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

On that page is an I wrote that you can use to check all reports using the .Check() method.

https://blogs.sap.com/2016/02/17/how-to-parameters-in-crystal-reports-for-visual-studio-net/

It's in the dropdown list box on the right.

What you could do by using in combination with Check is to replace the formula name and update the reports on the fly. Just use the SaveAs to either overwrite the original or make a copy and then overwrite it so it doesn't need to be fixed the next time.

Don

Former Member
0 Kudos

Hi Don,

Thanks for the reply.

We named the formula "Ext_Q_Total" but the @ and brackets {} were added by Crystal when this formula is used in another formula, or even in a group sum. If the @ and {} are a problem, Crystal adds those in automatically. Those are things we can't change because Crystal formats them that way...or are we misunderstanding something?

Thanks

Joe