jenlion
IS-IT--Management
- Nov 13, 2001
- 215
I could really use some help getting my crystal report to run from my VB app. I have two problems:
1. If rept is my crystal report, I have several choices in properties and methods: rept.printreport, rept.sqlstring, etc. I want to pass a parameter to my report, though, and all the examples show rept.ParameterFields(x). I don't have ParameterFields as an option. I'm able to change the SQL string to reflect what I need, but that's not a scalable solution.
Is there some reason I don't have ParameterFields as an option? I get an error if I try to use it anyway (object doesn't support this method).
2. If my report gets too complicated, it will not open. I can say rept.PrintReport, and a Crystal window flashes and closes. Nothing. This happens sometimes when I add fields from tables to my report. I am not prompted to log on; I do have a connection to the SQL server database from the vb program, but the report doesn't ask me to make an OLE or ODBC connection (I've tried both). It just dies. No explanation. I've tried setting rept.UserName and rept.Password, but it doesn't seem to care.
I'm using VB6 sp5 and Crystal Reports 8 Professional. I found that I had to run the crystal reports installation that was included with Visual Studio 6 in order to get the Crystal Reports availablitiy in VB6; I installed to a different location from, but in addition to, my CR8. Crystal 8 doesn't seem to have a problem with that.
If anyone can give me some ideas, I would appreciate it. I've scoured everything, and everyone else seems to have this rept.ParameterFields(x) available. Hmm.
1. If rept is my crystal report, I have several choices in properties and methods: rept.printreport, rept.sqlstring, etc. I want to pass a parameter to my report, though, and all the examples show rept.ParameterFields(x). I don't have ParameterFields as an option. I'm able to change the SQL string to reflect what I need, but that's not a scalable solution.
Is there some reason I don't have ParameterFields as an option? I get an error if I try to use it anyway (object doesn't support this method).
2. If my report gets too complicated, it will not open. I can say rept.PrintReport, and a Crystal window flashes and closes. Nothing. This happens sometimes when I add fields from tables to my report. I am not prompted to log on; I do have a connection to the SQL server database from the vb program, but the report doesn't ask me to make an OLE or ODBC connection (I've tried both). It just dies. No explanation. I've tried setting rept.UserName and rept.Password, but it doesn't seem to care.
I'm using VB6 sp5 and Crystal Reports 8 Professional. I found that I had to run the crystal reports installation that was included with Visual Studio 6 in order to get the Crystal Reports availablitiy in VB6; I installed to a different location from, but in addition to, my CR8. Crystal 8 doesn't seem to have a problem with that.
If anyone can give me some ideas, I would appreciate it. I've scoured everything, and everyone else seems to have this rept.ParameterFields(x) available. Hmm.