I built a report in Access that used a variety of dlookup commands to extract specific data, and it worked very effectively. I am creating an updated version of this report in Crystal 10 using a SQL Server database. Unfortunately, Crystal does not appear to have a dlookup function, and am struggling with figuring out how I am going to get the old 'dlookup' data pulled onto the report. Here is my current plan/status:
I have created the main report, and a subreport. The subreport contains the source data relating to the old dlookup commands. The subreport contains 1 key and 2 additional lookup fields that I need to transfer to the main report. When I preview the subreport all the data is visible and accurate. I created 3 shared variables on the main report (1 for the key and 2 for the fields I need to pass from the subreport to the main report) as follows:
Shared StringVar NM_Cust_Name;
Shared StringVar NM_Cust_No;
Shared StringVar NM_Cust_Contract; <---- this is the key
In the subreport I created the same variables and assigned values as follows:
Shared StringVar NM_Cust_Name := {RM00101.CUSTNAME}
Shared StringVar NM_Cust_No := {SVC0601V.CUSTNMBR}
Shared stringvar NM_Cust_Contract := {SVC0601V.CONTNBR}
What I am trying to do is to have the main report look up the key on the subreport and return the matching lookup values. However, I cannot get any data to transfer from the subreport to the main report.
I know this is so simple, but I have beat my head against the wall long enough - time to swallow my pride and get the expert's advice...
Thanks in advance for your help...
I have created the main report, and a subreport. The subreport contains the source data relating to the old dlookup commands. The subreport contains 1 key and 2 additional lookup fields that I need to transfer to the main report. When I preview the subreport all the data is visible and accurate. I created 3 shared variables on the main report (1 for the key and 2 for the fields I need to pass from the subreport to the main report) as follows:
Shared StringVar NM_Cust_Name;
Shared StringVar NM_Cust_No;
Shared StringVar NM_Cust_Contract; <---- this is the key
In the subreport I created the same variables and assigned values as follows:
Shared StringVar NM_Cust_Name := {RM00101.CUSTNAME}
Shared StringVar NM_Cust_No := {SVC0601V.CUSTNMBR}
Shared stringvar NM_Cust_Contract := {SVC0601V.CONTNBR}
What I am trying to do is to have the main report look up the key on the subreport and return the matching lookup values. However, I cannot get any data to transfer from the subreport to the main report.
I know this is so simple, but I have beat my head against the wall long enough - time to swallow my pride and get the expert's advice...
Thanks in advance for your help...