I have posted some information, including code, on the SAP forum about this but have not received a response yet. I am not sure if I am barking up the wrong tree or not.
The short story is that I am recreating a WinForm viewer that I had in VB6 with the Crystal OCX. I am currently using CR for VS 13.0.9.1312 with VB.NET 2010.
The viewer handles logging into the MySQL database but the users have the option to use any external Crystal Report. I am not always the designer of the reports, so the viewer will not know anything about it, including if parameters exist, etc. So in my mind right now, it is best to allow the report itself to prompt the user for what it needs.
I have given the user the option to send the report to screen for preview, to pdf directly or to printer directly, or any combination of the three.
When I work with reports without any parameters, all the options work fine.
When I work with reports with parameters I have problems.
Printing to screen in the Crystal Viewer I get the preview on screen fine. The parameter window comes up, I enter the value and it just works. So I know my login code, assigning the ReportDocument to the viewer and the fact that the viewer is getting the parameter values is all working fine.
Printing direct to pdf using .ExportToDisk or to printer using .PrintToPrinter, I get the Missing Parameter Values message when the report has one or more parameters but it works fine without parameters.
My questions:
1) Do you need the Crystal Viewer to export to disk or send direct to the printer? Right now I am doing it all in the form with CR Viewer on it and am assigning the ReportDocument to the Viewer.ReportSource. Do I need to do that if I don't wish to see the report? Currently, I see the form start up and then I force it to close if there is no preview option on that particular report.
2) When does the parameter window normally show? Can I force it to show up at a specific point in my code? I cannot seem to be able to force it to show up when I run direct to pdf or to printer, it doesn't show at all.
3) What should I look at to try to solve this problem?
TIA, rasinc
The short story is that I am recreating a WinForm viewer that I had in VB6 with the Crystal OCX. I am currently using CR for VS 13.0.9.1312 with VB.NET 2010.
The viewer handles logging into the MySQL database but the users have the option to use any external Crystal Report. I am not always the designer of the reports, so the viewer will not know anything about it, including if parameters exist, etc. So in my mind right now, it is best to allow the report itself to prompt the user for what it needs.
I have given the user the option to send the report to screen for preview, to pdf directly or to printer directly, or any combination of the three.
When I work with reports without any parameters, all the options work fine.
When I work with reports with parameters I have problems.
Printing to screen in the Crystal Viewer I get the preview on screen fine. The parameter window comes up, I enter the value and it just works. So I know my login code, assigning the ReportDocument to the viewer and the fact that the viewer is getting the parameter values is all working fine.
Printing direct to pdf using .ExportToDisk or to printer using .PrintToPrinter, I get the Missing Parameter Values message when the report has one or more parameters but it works fine without parameters.
My questions:
1) Do you need the Crystal Viewer to export to disk or send direct to the printer? Right now I am doing it all in the form with CR Viewer on it and am assigning the ReportDocument to the Viewer.ReportSource. Do I need to do that if I don't wish to see the report? Currently, I see the form start up and then I force it to close if there is no preview option on that particular report.
2) When does the parameter window normally show? Can I force it to show up at a specific point in my code? I cannot seem to be able to force it to show up when I run direct to pdf or to printer, it doesn't show at all.
3) What should I look at to try to solve this problem?
TIA, rasinc