Integration with Crystal Reports 8.5
843829Jun 25 2002 — edited Aug 26 2003I want to integrate my java application with Crystal Report 8.5.
But, I don't want to integrate the results, I mean, just call the report from my app and pass all control to Crystal. I don't want anything like this.
For example, my application needs to filter the results of the report according to the user.
I know, I can pass parameters to the report. But, I want to pass also a sql clause. For example:
My report has the following sql:
SELECT CUSTOMER.CUST_ID, CUSTOMER.F_NAME, CUSTOMER.L_NAME, DEPARTMENT.NAME
FROM dba.CUSTOMER CUSTOMER, dba.DEPARTMENT DEPARTMENT
WHERE CUSTOMER.DEP_ID = DEPARTMENT.DEP_ID
AND CUSTOMER.DEP_ID = ?
I want to filter the departament according to the user logged. I'll pass the department_id as a parameter.
But, if my filter is more complex, could I pass a sql as a parameter, adding to the existing sql, like this:
" and CUSTOMER.CITY = DEPARTMENT.CITY and DEPARTMENT.CITY = 'Rio de Janeiro' ".
(For example, a filter by city and department)
My report (the default) never change. Only the results change according my business rule (each business rule has a kind of filter) and is not a good idea to compose a report for each context.
Anybody knows how could I make this integration?