Crystal Report: Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

后端 未结 2 471
清歌不尽
清歌不尽 2020-12-12 04:52

I can not pass values to the report.

This is my code:

public void GLRPT()
        {
            try
            {

                ReportClass rptH =         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 05:48

    I know the topic a little bit old, but it might help for someone if I share my experience.

    As we can read in many topics, "the parameters name are different in the report file and the code". Yes this is true, but it is also happens if you added or removed parameters from the report file and forgot to copy the new file into your application location. It would be the Visual Studio job, but sometimes the VS forget to copy the modified report file to the "Debug" folder, I think.

    The point of this writing, after you modified your report file, regarding parameters, copy it into your compiled location.

提交回复
热议问题