Hi everybody,
[Crystal Reports 2008]
I have a report that connects rows in a table based on a common field, an order number. However, there's a field, called Draft/Final, that indicates whether a specific form has been completed or not. The problem is that the table is the data source for four (4) different forms and there's only one Draft/Final field.
So, what I decided to do was add a subreport, pass the order number, determine whether the last form (I'll call it Form D) has been completed or not, pass that value back to the main report, then use that to determine how to display the record for the next to last form (Form C).
However, because I'm using a subreport and passing a value in a formula, I can't use that formula in the record selection to eliminate unnecessary records because it has to be evaluated later. So, my question is: since I used SQL Commands in the main report and the subreport to improve performance and because I want to eliminate records based on the return value in the subreport, can I write the SQL command for the subreport into the main report?
I thought that I'd seen this done before, but wasn't sure if it was with SQL commands or with SQL expressions.
My end game is to show all Form C's that have been completed, then check to see if Form D has been completed for that order number. If it has, I want that record to drop off the list. If it hasn't then I want it to continue to stay on the report until it's completed.
Thanks,
beacon
[Crystal Reports 2008]
I have a report that connects rows in a table based on a common field, an order number. However, there's a field, called Draft/Final, that indicates whether a specific form has been completed or not. The problem is that the table is the data source for four (4) different forms and there's only one Draft/Final field.
So, what I decided to do was add a subreport, pass the order number, determine whether the last form (I'll call it Form D) has been completed or not, pass that value back to the main report, then use that to determine how to display the record for the next to last form (Form C).
However, because I'm using a subreport and passing a value in a formula, I can't use that formula in the record selection to eliminate unnecessary records because it has to be evaluated later. So, my question is: since I used SQL Commands in the main report and the subreport to improve performance and because I want to eliminate records based on the return value in the subreport, can I write the SQL command for the subreport into the main report?
I thought that I'd seen this done before, but wasn't sure if it was with SQL commands or with SQL expressions.
My end game is to show all Form C's that have been completed, then check to see if Form D has been completed for that order number. If it has, I want that record to drop off the list. If it hasn't then I want it to continue to stay on the report until it's completed.
Thanks,
beacon