Hi everybody,
[Crystal Reports 2008]
Right off the bat, let me mention that I didn't create the database I'm having to work with and don't have access to modify the tables, create views, etc.
That being said, here's goes nothing.
I'm working with a table that is the back-end for four forms on the front-end. This table contains ALL of the fields from each of the four forms, but doesn't share the data between rows...a new row is created for each form.
One of the fields in each of the forms is a field that holds an order number. However, the field on each of the forms is named differently and has its own field in the table. So, four forms with a different order number field on each form means there are four fields that hold the same value.
For instance:
Form 1 has values Patient ID, Patient Name, Referral Order Number, and a bunch of other values
Form 2 has values Patient ID, Patient Name, Appointment Order Number, and a bunch of other values
Form 3 has values Patient ID, Patient Name, Consult Order Number, and a bunch of other values
Form 4 has values Patient ID, Patient Name, Review Order Number, and a bunch of other values.
Each time you complete a form, a new row is created. The forms are setup to be filled out in order: Referral, Appointment (one or more), Consult, and Review. Because each of the forms has a different placeholder for the order number, which is common between the forms, but not automatically passed to subsequent forms, how can I combine these records so I can pull the Referral, Appointment, Consult, and Review for a single order number that appears in multiple rows?
I know I can set this up in my SQL to say "WHERE Ref_OrderNumber = 123456 OR App_OrderNumber = 123456...", but this will still pull each row as a separate instance. If I've entered data into each of the four forms, then I'll have four rows of data when what I really want is one row where the same order number appears in each instance.
I was thinking that it might be possible to do this with multiple embedded subreports, but that was before I found out that you can't have a subreport in a subreport.
Does anyone know if this is possible and, if so, how I can go about setting it up?
Thanks,
beacon
[Crystal Reports 2008]
Right off the bat, let me mention that I didn't create the database I'm having to work with and don't have access to modify the tables, create views, etc.
That being said, here's goes nothing.
I'm working with a table that is the back-end for four forms on the front-end. This table contains ALL of the fields from each of the four forms, but doesn't share the data between rows...a new row is created for each form.
One of the fields in each of the forms is a field that holds an order number. However, the field on each of the forms is named differently and has its own field in the table. So, four forms with a different order number field on each form means there are four fields that hold the same value.
For instance:
Form 1 has values Patient ID, Patient Name, Referral Order Number, and a bunch of other values
Form 2 has values Patient ID, Patient Name, Appointment Order Number, and a bunch of other values
Form 3 has values Patient ID, Patient Name, Consult Order Number, and a bunch of other values
Form 4 has values Patient ID, Patient Name, Review Order Number, and a bunch of other values.
Each time you complete a form, a new row is created. The forms are setup to be filled out in order: Referral, Appointment (one or more), Consult, and Review. Because each of the forms has a different placeholder for the order number, which is common between the forms, but not automatically passed to subsequent forms, how can I combine these records so I can pull the Referral, Appointment, Consult, and Review for a single order number that appears in multiple rows?
I know I can set this up in my SQL to say "WHERE Ref_OrderNumber = 123456 OR App_OrderNumber = 123456...", but this will still pull each row as a separate instance. If I've entered data into each of the four forms, then I'll have four rows of data when what I really want is one row where the same order number appears in each instance.
I was thinking that it might be possible to do this with multiple embedded subreports, but that was before I found out that you can't have a subreport in a subreport.
Does anyone know if this is possible and, if so, how I can go about setting it up?
Thanks,
beacon