Shown below is a portion of my code to either print a report or email a report. The portion of the code where it states "Send email address from REFFINDLINK...." and the next 10 or so lines is the code that A5 generated for me. The first query is where I determine if there are any games assigned to a particular official, if the query is zero, fetch the next official and perform the query again. My question is this...Within the code
:Report.Send("IndividualRefpdf","PDF",query.filter,query.order,"a5",to_param,subject_param,message_param,cc_param,bcc_param)
What do I do with the query.filter and the query.order parameters. The query has already been performed. How do eliminate those parameters to keep my current query?
'query.description = ""
query.filter = "(between(dtoc(gamedate),dtoc(findbegin),dtoc(findend))).and.((ref_num=findref).or.(l1_num=findref).or.(l2_num=findref))"
query.order= "dtoc(gamedate)+ampm+time"
indx = tbl1.query_create()
rec_count=indx.records_get()
If rec_count = 0
reftbl.fetch_next()
goto bypass
End If
If tbl3.findemlsched = .f. 'findemlsched is a logical field to determine if the report is to be printed or emailed.
' Report.Print("individualref")
reftbl.fetch_next()
end if
If tbl3.findemlsched = .t.
'Send email using address from REFFINDLINK and the ref that has been selected
query.filter = ""
query.order = ""
to_param = a5_eval_expression("=Findreflink->Findemail")
cc_param = a5_eval_expression("")
bcc_param = a5_eval_expression("")
subject_param = a5_eval_expression("=Var->EmlSubject")
message_param = a5_eval_expression("=Var->EmlMessage")
:Report.Send("IndividualRefpdf","PDF",query.filter,query.order,"a5",to_param,subject_param,message_param,cc_param,bcc_param)
reftbl.fetch_next()
end if
bypass:
I hope this makes sense.
Thanks
:Report.Send("IndividualRefpdf","PDF",query.filter,query.order,"a5",to_param,subject_param,message_param,cc_param,bcc_param)
What do I do with the query.filter and the query.order parameters. The query has already been performed. How do eliminate those parameters to keep my current query?
'query.description = ""
query.filter = "(between(dtoc(gamedate),dtoc(findbegin),dtoc(findend))).and.((ref_num=findref).or.(l1_num=findref).or.(l2_num=findref))"
query.order= "dtoc(gamedate)+ampm+time"
indx = tbl1.query_create()
rec_count=indx.records_get()
If rec_count = 0
reftbl.fetch_next()
goto bypass
End If
If tbl3.findemlsched = .f. 'findemlsched is a logical field to determine if the report is to be printed or emailed.
' Report.Print("individualref")
reftbl.fetch_next()
end if
If tbl3.findemlsched = .t.
'Send email using address from REFFINDLINK and the ref that has been selected
query.filter = ""
query.order = ""
to_param = a5_eval_expression("=Findreflink->Findemail")
cc_param = a5_eval_expression("")
bcc_param = a5_eval_expression("")
subject_param = a5_eval_expression("=Var->EmlSubject")
message_param = a5_eval_expression("=Var->EmlMessage")
:Report.Send("IndividualRefpdf","PDF",query.filter,query.order,"a5",to_param,subject_param,message_param,cc_param,bcc_param)
reftbl.fetch_next()
end if
bypass:
I hope this makes sense.
Thanks
Comment