Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Selection Formula Help 1

Status
Not open for further replies.

KnappPOS

Technical User
Nov 1, 2000
3
US
Any and all suggestions would be appreciated. I am trying to combine information from two reports into one using Crystal Reports v6.0. Micros Systems Inc. wrote the reports in question for their Restaurant Enterprise Series 3700 Point of Sale software. My problem is that the record selection formula for each report is different and I have been unable to modify the formula to successfully select all of the necessary records for my combined report. Here are the details:

Record Selection Formula for time_004.rpt

{v_R_employee_job_code.business_date} in DTSToDate({@Start_Date}) to DTSToDate({@End_Date}) and
{v_R_employee_job_code.employee_number} in ToNumber({@Start_Employee}) to ToNumber({@End_Employee})

Time_004.rpt Formulas within Record Selection Formula

@Start_Date '1990/01/01'
@End_Date '2099/12/31'

@Start_Employee '1'
@End_Employee '99999999'



Record Selection Formula for emp_102.rpt

if {@Start_Shift} = '0' then
DTSToDate ({sp_R_cons_emp_ttls.start_business_date}) in
DTSToDate ({@Start_Date}) to DTSToDate ({@End_Date}) and
{sp_R_cons_emp_ttls.employee_number} in ToNumber({@Start_Employee}) to ToNumber({@End_Employee});


Emp_102.rpt Formulas within Record Selection Formula

@Start_Shift '0'
@Start_Date '1990/01/01'
@End_Date '2099/12/31'

@Start_Employee '1'
@End_Employee '99999999'

Thank you for your assistance.
 
Each report uses different tables. Does your combined report have all the tables from both reports? Are those tables linked appropriately?



 
Thank you for the reply. Yes the combined report has all the tables from both reports. However, the Visual Linking Expert did not create any links. When I tried to link the tables manually, I received the following error:Invalid file link. SQL stored procedures cannot be linked. Any suggestions?
 
sp_R_cons_emp_ttls is likely a stored proc.
v_R_employee_job_code is likely a view.
Crystal cannot join stored procedures with anything else.
You can create a new view or stored procedure that has sp_R_cons_emp_ttls joined to v_R_employee_job_code. This may be difficult to do unless you know the content of both sp_R_cons_emp_ttls and v_R_employee_job_code.
If performance is not a big issue, you could create one report based on either the view or the stored proc, then insert a subreport based on the other view/stored proc. It would be slow to execute, but would get around the invalid file link error.
 
Thanks for the input. I'll give it a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top