I want to pass the filename and location of an image to a Crystal Report.
This works fine if I hardcode the image path such as
But I can't use an openFileDialog to select the image as I always get "Report Load Failed".Code:string ImagePathTest = @"C:\temp\image.jpg"; myRpt.SetParameterValue("ImagePath", this.lblImagePath.Text); //OR myRpt.SetParameterValue("ImagePath", @"C:\temp\image.jpg");
This happens even if I don't use the file selected from the dialog. i.e. just clicking on the openfileDialog but passing hardcoded strings causes the report to fail to load.
I even tried adding a new form before this one that contained an openFileDialog and passed the file path but the result was the same.
It's as if just opening the OpenFileDialog is causing the report to not load!
Thanks in advance.




Reply With Quote