0

i have problem in my Crystal Report.........

i have problem in this line "crParameterFieldDefinition = crParameterFieldDefinitions["CDate"];

Info_Report cryRpt = new Info_Report();
            cryRpt.Load(@"C:\Users\xxx\Desktop\assignment2\assignment2\assignment2\Info Report.rpt");


            ParameterFieldDefinitions crParameterFieldDefinitions;
            ParameterFieldDefinition crParameterFieldDefinition;
            ParameterValues crParameterValues = new ParameterValues();
            ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();


            crParameterDiscreteValue.Value = dateTimePicker1.Value;
            crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
            crParameterFieldDefinition = crParameterFieldDefinitions["CDate"];
            crParameterValues = crParameterFieldDefinition.CurrentValues;

            crParameterValues.Clear();
            crParameterValues.Add(crParameterDiscreteValue);
            crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);


            crystalReportViewer1.ReportSource = cryRpt;
            crystalReportViewer1.Refresh();
        }

Edited by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by __avd
0

Open crystal designer and check the name of parameter. I think it should be CDate1 or something else.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.