Hi guys,
I've spent most of the day designing an app (vb6, crystal 7) that will export a crystal report into html format and do a bunch of other stuff. That seems to work okay (although when you export a report from crystal 7 into html it makes a complete mess of it...pretty average output actually). Anyhoo, I now want to pass a parameter through to the report so that the user isn't prompted for anything.
To test my code I've been using the "customers.rpt" report that comes with crystal 7. This report only has one parameter which is named "employee name". I've been trying the following:
myReport.ParameterFields(0) = "employee name;John Doe;True"
myReport.ParameterFields(1) = "employee name;John Doe;True"
Q1: Does parameterfields start at 0 or 1? I put them both in but it makes no difference.
Q2: Does this syntax look right? Because it doesn't work. The report keeps opening up and keeps asking me to choose from a list of available parameters (it doesn't even set John Doe to be the default value in the list).
Q3: Do I need brackets if a parameter name is more than one word? How about the value that I'm passing? Does John Doe need to be in brackets or quotes or something?
Any help would be appreciated, this vb/crystal stuff is driving me nuts.
Cheers,
Andrew
I've spent most of the day designing an app (vb6, crystal 7) that will export a crystal report into html format and do a bunch of other stuff. That seems to work okay (although when you export a report from crystal 7 into html it makes a complete mess of it...pretty average output actually). Anyhoo, I now want to pass a parameter through to the report so that the user isn't prompted for anything.
To test my code I've been using the "customers.rpt" report that comes with crystal 7. This report only has one parameter which is named "employee name". I've been trying the following:
myReport.ParameterFields(0) = "employee name;John Doe;True"
myReport.ParameterFields(1) = "employee name;John Doe;True"
Q1: Does parameterfields start at 0 or 1? I put them both in but it makes no difference.
Q2: Does this syntax look right? Because it doesn't work. The report keeps opening up and keeps asking me to choose from a list of available parameters (it doesn't even set John Doe to be the default value in the list).
Q3: Do I need brackets if a parameter name is more than one word? How about the value that I'm passing? Does John Doe need to be in brackets or quotes or something?
Any help would be appreciated, this vb/crystal stuff is driving me nuts.
Cheers,
Andrew