Skip to Content
0

Unspecified error when opening parameter screen

Jun 28, 2017 at 09:33 AM

227

avatar image
Former Member

Hi

First time here! We're currently using Crystal Reports SDK for visual studio v13.0.20.2399 (tried service packs 16-20 with same issue). The report is a very simple test report (which I can't attached :( ), all it has in there is a parameter:

Numeric, static, custom values true, multiple values true, discrete values true

In my code, I have 5 lines of code to load in the report and display it, the report should open the parameters screen and ask for the numeric value (multi choice), however it simply comes up with CR error window saying "unspecified error" instead of the parameter screen.

In a new small test application (new empty winforms .net 4.6 application), it works as it should, no issues, however in our main much larger application I've put a new clean test form that is opened as a dialog form, it errors. I've tried messing around with the parameter settings using CR2013, the only time it works is if I change the parameter from a numeric to a string, which is not what we want to do with 100's reports.

ReportViewer.Error += ReportViewerError;

var reportDocument = new ReportDocument();

reportDocument.Load(ReportFile);

ReportViewer.ReportSource = reportDocument;

ReportViewer.Refresh();

I've managed to turn on the LOGGING for CR and compared the files, and the application where it works in, has loads more information at the end (hopefully the 6 files are attached).

I've also hooked up an error event to output the error to a message box, which I've also attached as an image, but it's not very helpful.

Thanks for any help / advice on this issue.

on this.

Alan

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Don Williams
Jul 18, 2017 at 09:45 PM
0

Go to the download page, there is a link to a Parameter app that sets log on and see if that works.

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

Share
10 |10000 characters needed characters left characters exceeded
Dell Stinnett-Christy Jun 28, 2017 at 02:05 PM
0

Are you running the larger app on a computer where the SDK runtime has been installed? You need to have the same version (SP) of the runtime as the SDK the application was compiled with. Also, you can't just roll the runtime assemblies into your install - you must install the full runtime from one of the downloads - there are some COM components in the background that need to be registered.

-Dell

Show 8 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Many thanks for the response, I have sp18 runtime installed, initially so I'll hunt down SP 20 runtimes and see if that helps. Though I do think I was getting the issue with SP18 as well.

I have CR for VS_13_0_20 install, the smaller app and the larger app are both on my own PC and reference the exact same DLLs, so if it didn't work on one app then it shouldn't work on the other, but that isn't the case.

Alan

EDIT - Note this issue is happening on some of our clients pcs in the application, who will have SP18 runtime installed and SP18 DLLs. I've updated to SP20 on my dev machine to see if that will solve the issue.

0
Former Member

Just a further update - I've reinstalled both the runtime for SP 20 and the CRforVS as well, but I'm still having the same issue.

0

Are you installing both of these on the same computer? The development computer should only have CRforVS installed - it includes the runtime.

If they're on different computers, did you install the runtime while logged in with Administrator rights or using "Run as Administrator"? If not, that could be your problem because there a number of registry settings that the install adds and it won't do it correctly if you don't have admin rights.

-Dell

0
Former Member

Hi, thanks for the reply. I've installed the runtime on a test PC and the CR for VS on my Dev PC - both as Admin users - I tend to run everything with admin rights.

As mentioned I have a very simpler test application - with 5 lines of code and a Winform with the CR Viewer on it, this works fine, but when I copy the same form and 5 lines of code into my main larger application, I get the CR Error. "unspecified error" doesn't really help. I'm at a complete loss as to why it might be doing this.

0

Make sure all references in the app.config file is using version 13.

0
Former Member
Don Williams

Hi Don,

Many thanks for the comment about app.config -- However I don't have any references in the app.config files pointing to crystal reports. Can you supply what I need to put in there - My small sample application doesn't have them either and the report works fine in that.

0

Create a new project but before you do that in the toolbox select Choose Item.... from the .NET tab select Crystal Reports Viewer so it shows up under the Reporting section.

Now create a new project and select WinForm. Drop the CR viewer onto the Form and VS should add the Engine, Shared and ReportSource assemblies as well as the app.config file.

Or use one of my test app's on the WIKI.

Don

0
Former Member
Don Williams

Thanks for the reply. The CR Toolbox doesn't exist for me - probably because I'm using VS2017, but my colleague uses VS2015 and he still gets the same issue.

I've downloaded the samples for the wiki and found the following like so I've added them to our APP.CONFIG file. However it made no difference and we still got the same error in our application. I'm really at a loss as to what to do now and we might need to revert back to our old original 2008 CR DLLs and hope they still work.

<system.web> <compilation> <assemblies> <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> <add assembly="CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> </assemblies> </compilation> </system.web>

0
Don Williams
Jul 12, 2017 at 01:52 PM
0

Ah, you should have mentioned VS 2017 sooner. Not supported until SP 21, end of august.

Also explains why you can't add the Viewer and why it's not generating an app.config file, CR templates did not get installed into VS 2017.

CR 2008 will not work either, it did not support any VS above 2008.

A great example of why adding all relevant info to a post is a must, would have saved us all a lot of time...

Don

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I don't think it's an issue of vs2017 as my colleague uses 2015 and he has the same issue with the application when he compiles it under that VS. I understand it not adding to the toolbox for 2017, but that isn't needed as the control is already on the form and still shows on the form when open in designer. It works in my small sample application with no issues, where I have a simple form, with the above 5 lines of code I mentioned, however the same form and 5 lines of code throws the error when the report is opened in our main application.

However today - I've now reverted the DLLs back to v12.0.2000.0 and recompiled the application - it works with these DLLS no problem, the issue seems to be when we use the v13 files (sp 15 through to 20 were tested).

I will try SP 21 when it finally comes out (Sept?) to see if this solve the issues.

0
Don Williams
Jul 13, 2017 at 04:46 PM
0

Check your app.config file, it's likely trying to load version 12 assemblies. August.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

The app config doesn't contain any links to the CR assemblies (and never have) - I've also added them in and still have the same issue.

0