cancel
Showing results for 
Search instead for 
Did you mean: 

c# - console application

0 Kudos
1,375

I want to write an console application in c#. Every time i use "load()" the following message shows up, after a klick on "OK", everything works. As an Windows Forms application, it works without problems?

My code is simple:

using (ReportDocument cryRpt = new ReportDocument())
{
 try {
   cryRpt.Load(dokPath);
   cryRpt.SetParameterValue('QR', 'my value');
   cryRpt.PrintToPrinter(1, false, 0, 0);
  }
}

Whats the problem here? Thanks for your help.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Daniel,

I had another person report the same issue, or close to it. CR for VS used to use a FlexNet Server to allow in place upgrades to happen. That server is no longer working so when you get this type of error it means you are applying a SP on top of an existing install.

So uninstall everything again, go into this folder and if you only had CR for VS installed delete the folder:

C:\Program Files (x86)\SAP BusinessObjects

Go to your %USER%\AppData\Local\Temp

and delete all files, about 5 or 6 may be locked so just skip them. Close all other app's first.

Verify Programs and Features do not show any CR for VS installs.

Try reinstalling again and right click on the setup.exe and choose Run As Administrator, do not installing just the MSI packages on the Developers PC, use the EXE to install, it has the option to install the 64 bit runtime, click OK. That way it fully integrates into Visual Studio.

Do not install the MSI packages on your DEV PC, it causes all sorts of upgrade issues if you don't uninstall them in reverse order once you have done that.

Thanks again

Don

Answers (4)

Answers (4)

0 Kudos

Someone else reported an install issue also with possibly the same type of error, .NET Reflector.

Can you go here:

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\logging

Have a look in the install log file and search for any errors registering dll's.

Thanks

Don

0 Kudos

Hi Don, I think there is a misunderstanding here. I don't use .net reflector or have anything like that installed by myself. The Message only apears on the screen, when using Crystal Reports in a console application (in my case with a grpc service).

When i use CR as a windows form application it works like a charm. But as a console application, the .net reflector message shows up, when useing the Load() command.

So you still think, that i shout talk with Eziriz?

0 Kudos

Hi Don,

thanks for your help. I use the SP 27

i have removed everything and install the newest version again - still same problem

0 Kudos

Changed the Tag to CR for VS.

What version are you using?

Go to Programs and Features and look at the version beside Crystal Reports for .NET....

Someone may have renamed or locked the runtime.

You can get it from here:

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

Be sure too install the EXE on your DEV PC by selecting Run As Administrator on the setup.exe

Don