I created a form with a button to print a report - this button worked just fine until this morning and I cannot figure out what is wrong -
I have printed at least 30 reports off this button yesterday with all my testing and never had an error.
I suddenly get the error "extra characters at the end of expression" and it names the line -- I cannot see any extra characters, I DID NOT change this line in any way so why would I get this error?
This is the code:
'
vID_num = parentform.Table_Get().Id_num
current_filter = current_filter_expn()
current_order = current_order_expn()
query.filter = current_filter + ".and. inspections->Coverltrtext = .t."
query.order = current_order
'Prompt user whether to print, or preview the layout. Set default to Print
prompt_result = ui_get_print_or_preview("Print")
If prompt_result = "Print" then
:Report.Print("Multy InspectC",query.filter,query.order)
Else if prompt_result = "Preview" then
:Report.Preview("Multy InspectC",query.filter,query.order)
End if
t = table.open("inspections")
query.options = ""
query.order = ""
query.description = ""
query.filter = "ID_num = "+vId_Num
ndx = t.query_create()
if ndx.records_get() < 1
end
end if
t.fetch_first()
while .not. t.fetch_eof()
if t.Coverltrtext = .t.
t.change_begin()
t.Coverltrtext = .f.
t.change_end()
end if
t.fetch_next()
end while
t.close()
parentform.Resynch()
It tells me the extra characters are at the end of this line:
:Report.Print("Multy InspectC",query.filter,query.order)
I have tried making a new form - adding a new button just using action scripting and I get the same error --
When making the new button and under the Selection of Records to Print, I chose "Records selected by a filter expression" and when I go into that mode it brings up the incorrect set to filter on -- it is NOT the set the form is built on and I don't think I have ever come across that before.
HELP !! Anyone have any idea what is going on here?
Terri
I have printed at least 30 reports off this button yesterday with all my testing and never had an error.
I suddenly get the error "extra characters at the end of expression" and it names the line -- I cannot see any extra characters, I DID NOT change this line in any way so why would I get this error?
This is the code:
'
vID_num = parentform.Table_Get().Id_num
current_filter = current_filter_expn()
current_order = current_order_expn()
query.filter = current_filter + ".and. inspections->Coverltrtext = .t."
query.order = current_order
'Prompt user whether to print, or preview the layout. Set default to Print
prompt_result = ui_get_print_or_preview("Print")
If prompt_result = "Print" then
:Report.Print("Multy InspectC",query.filter,query.order)
Else if prompt_result = "Preview" then
:Report.Preview("Multy InspectC",query.filter,query.order)
End if
t = table.open("inspections")
query.options = ""
query.order = ""
query.description = ""
query.filter = "ID_num = "+vId_Num
ndx = t.query_create()
if ndx.records_get() < 1
end
end if
t.fetch_first()
while .not. t.fetch_eof()
if t.Coverltrtext = .t.
t.change_begin()
t.Coverltrtext = .f.
t.change_end()
end if
t.fetch_next()
end while
t.close()
parentform.Resynch()
It tells me the extra characters are at the end of this line:
:Report.Print("Multy InspectC",query.filter,query.order)
I have tried making a new form - adding a new button just using action scripting and I get the same error --
When making the new button and under the Selection of Records to Print, I chose "Records selected by a filter expression" and when I go into that mode it brings up the incorrect set to filter on -- it is NOT the set the form is built on and I don't think I have ever come across that before.
HELP !! Anyone have any idea what is going on here?
Terri
Comment