Click here to Skip to main content
15,444,490 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys,

I just migrated my C# WinForms application from VS2015 Professional to VS2019 Professional. Now when I run my Crystal Report (version SP26), a dialog box pops up informing that "The parameter is incorrect." My report worked perfectly on VS2015 and CrystalReports SP25.

Any ideas on what could be causing this error? Thanks a lot for your time and help. I really appreciate it!

Best regards,

JC :)

What I have tried:

Here's my code for the Form that contains the ReportViewer:

using CrystalDecisions.Shared;
using System;
using System.Windows.Forms;

namespace Bremington
    public partial class AniversariantesRV : Form
        public AniversariantesRV()
        private void CrystalReportViewer1_Load(object sender, EventArgs e)

        private void setReportParameters()
            ParameterFields paramFields = new ParameterFields();

            ParameterField pfMes = new ParameterField();
            ParameterField pfUnidade = new ParameterField();

            pfMes.ParameterFieldName = "prmMes";
            pfUnidade.ParameterFieldName = "prmUnidade";

            ParameterDiscreteValue dvMes = new ParameterDiscreteValue();
            ParameterDiscreteValue dvUnidade = new ParameterDiscreteValue();

            dvMes.Value = Aniversariantes.varMes;
            dvUnidade.Value = Aniversariantes.varUnidade;



            crystalReportViewer1.ParameterFieldInfo = paramFields;
Updated 27-Feb-21 3:54am
Gerry Schmitz 27-Feb-21 11:46am    
Go back to VS15 and try again. Need to learn about "different realities".

It seems the good people at CodeProject are getting a bit tired of all the Crystal Report problems. So if no one answers your question take a look at an alternative like FastReport, see: open-source-reporting-tools[^]
Share this answer
Hi, Rick. It was a Windows 10 issue. The problem was fixed after a brand new install.
Thanks for replying!
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900