locked
The types of the parameter field and parameter field current values are not compatible. RRS feed

  • Question

  •  The crystal report  is working fine but when i run the coding in 2008 it shows :The types of the parameter field and parameter field current values are not compatible. This is my coding to pass the parameters in visual studio 2008; (month and year is in nvarchar and username is in int)

    ReportParametersObject = New ReportParameters
    ReportParametersObject.ParameterName = "@paMonthIn"
    ReportParametersObject.ParameterValue = ParentFormController.DateByMonthDateTimePicker.Value.Date.Month.ToString
    ReportParametersListObject.Add(ReportParametersObject)

    ReportParametersObject = New ReportParameters
    ReportParametersObject.ParameterName = "@paYearIn"
    ReportParametersObject.ParameterValue = ParentFormController.ToYearDateTimePicker.Value.Date.Year.ToString
    ReportParametersListObject.Add(ReportParametersObject)

    ReportParametersObject = New ReportParameters
    ReportParametersObject.ParameterName = "@paUserIdIn"
    ReportParametersObject.ParameterValue = ApplicationHelper.UserName
    ReportParametersListObject.Add(ReportParametersObject) 

    • Moved by Youjun Tang Wednesday, May 13, 2015 8:19 AM Not supported
    Tuesday, May 12, 2015 9:00 AM

Answers

All replies

  • Hi,

    Please post your question to Crystal Report Forum for a better assistance on your case.

    Thanks,


    Fouad Roumieh

    • Proposed as answer by KareninstructorMVP Tuesday, May 12, 2015 11:56 AM
    • Marked as answer by Just Karl Wednesday, May 20, 2015 8:15 PM
    Tuesday, May 12, 2015 9:05 AM
  • sorry,

    because the error shows in the vb code

    Tuesday, May 12, 2015 9:43 AM
  • I know that, but because its vb.net using third party libraries, so the right experience is there and your question can be answered in a more concise way on that forum. You can check here vb.net code issues related to CR are discussed there.

    However that's a suggestion to help and you allowed to keep it here for sure.


    Fouad Roumieh

    Tuesday, May 12, 2015 9:50 AM
  • About the only thing to work on here other than posting to the forum recommended is to check types passed into the parameters i.e. @paYearIn, try the value without ToString even though conventional parameters should properly adjust for what is being passed to a parameter we don't know as in this case you are dealing with a 3rd party library which is not supported here.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

    Tuesday, May 12, 2015 11:58 AM