chrispchenry
Programmer
Hi again,
After sorting out the problem w/ the parameters and crystal reports, I've got another one.
Originally I had intended to have only one report in my program. I stored the report name, description and the filename in a table. I can call the filename and such from the table and pass them to the program. The report launches fine. However, since I have multiple reports, they have different selection formuli. I've been trying to draw the selection formula from the table, but I haven't been able to get it to work. It also won't give me error messages.
The syntax in the table is:
{employee.ID} = '" & strGlobalEmpID & "'
It's called into the program using a recordset.
strSQLQuery = recEmps.fields("SelForm"
I set the parameter using
rptEmp.SelectionFormula = strSQLQuery
When I hardcode the selection formula, I use the exact same syntax:
rptEmp.SelectionFormula = "{employee.ID} = '" & strGlobalEmpID * '"
The hardcoded version works, but I can't get the formula drawn from the table to work properly. I tried coding the selection formula into the report itself, but that also didn't work. Plus, some reports using the same report file w/ a different selection formula.
After sorting out the problem w/ the parameters and crystal reports, I've got another one.
Originally I had intended to have only one report in my program. I stored the report name, description and the filename in a table. I can call the filename and such from the table and pass them to the program. The report launches fine. However, since I have multiple reports, they have different selection formuli. I've been trying to draw the selection formula from the table, but I haven't been able to get it to work. It also won't give me error messages.
The syntax in the table is:
{employee.ID} = '" & strGlobalEmpID & "'
It's called into the program using a recordset.
strSQLQuery = recEmps.fields("SelForm"
I set the parameter using
rptEmp.SelectionFormula = strSQLQuery
When I hardcode the selection formula, I use the exact same syntax:
rptEmp.SelectionFormula = "{employee.ID} = '" & strGlobalEmpID * '"
The hardcoded version works, but I can't get the formula drawn from the table to work properly. I tried coding the selection formula into the report itself, but that also didn't work. Plus, some reports using the same report file w/ a different selection formula.