Skip to Content
Apr 10, 2020 at 07:09 AM

c# - console application

272 Views Last edit Apr 17, 2020 at 03:42 PM 3 rev

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.SetParameterValue('QR', 'my value');
   cryRpt.PrintToPrinter(1, false, 0, 0);

Whats the problem here? Thanks for your help.


error.png (2.6 kB)