I apologize for such a basic question, but in some ways I don't even know how to "search" for the answer as I can't seem to define my keywords. The issue is that I am trying to print a report based on the current record. I do the following:
1. Choose action scripting
2. Add New Action
3. Chose Reports
4. Chose Preview a layout
5. Chose the report name
6. Check Display Print/Preview at Runtime
7. Chose current record only
8. Save the Action
9. When I "run" the form and depress the button I am prompted correctly for Print/Preview. However immediately after that the "Select Filter" appears to chose whether I want to sort it, or print a range, etc.
Obviously this is superflous and will just confuse my client.
When I "print" an invoice in Alphasports it appears correctly. I have looked at the code generated by the wizard and they are both identical except for the report name.
Code Generated For My Form
'Preview a report, label, letter, form or browse layout. You can specify which records to preview.
record_number = current_record_number()
query.filter = "recno() = " + record_number
query.order = ""
'Prompt user whether to print, or preview the layout. Set default to Preview
prompt_result = ui_get_print_or_preview("Preview ")
If prompt_result = "Print" then
:Report.Print("1Annual_Inspection",query.filter,query.order)
Else if prompt_result = "Preview" then
:Report.Preview("1Annual_Inspection",query.filter,query.order)
End if
Code Generated For AlphaSports
'Preview a report, label, letter, form or browse layout. You can specify which records to preview.
record_number = current_record_number()
query.filter = "recno() = " + record_number
query.order = ""
'Prompt user whether to print, or preview the layout. Set default to Preview
prompt_result = ui_get_print_or_preview("Preview ")
If prompt_result = "Print" then
:Report.Print("Invoice",query.filter,query.order)
Else if prompt_result = "Preview" then
:Report.Preview("Invoice",query.filter,query.order)
End if
Obviously, I am missing a setting somewhere although I am baffled as to where to find it. Any help would be appreciated.
Thank you.
1. Choose action scripting
2. Add New Action
3. Chose Reports
4. Chose Preview a layout
5. Chose the report name
6. Check Display Print/Preview at Runtime
7. Chose current record only
8. Save the Action
9. When I "run" the form and depress the button I am prompted correctly for Print/Preview. However immediately after that the "Select Filter" appears to chose whether I want to sort it, or print a range, etc.
Obviously this is superflous and will just confuse my client.
When I "print" an invoice in Alphasports it appears correctly. I have looked at the code generated by the wizard and they are both identical except for the report name.
Code Generated For My Form
'Preview a report, label, letter, form or browse layout. You can specify which records to preview.
record_number = current_record_number()
query.filter = "recno() = " + record_number
query.order = ""
'Prompt user whether to print, or preview the layout. Set default to Preview
prompt_result = ui_get_print_or_preview("Preview ")
If prompt_result = "Print" then
:Report.Print("1Annual_Inspection",query.filter,query.order)
Else if prompt_result = "Preview" then
:Report.Preview("1Annual_Inspection",query.filter,query.order)
End if
Code Generated For AlphaSports
'Preview a report, label, letter, form or browse layout. You can specify which records to preview.
record_number = current_record_number()
query.filter = "recno() = " + record_number
query.order = ""
'Prompt user whether to print, or preview the layout. Set default to Preview
prompt_result = ui_get_print_or_preview("Preview ")
If prompt_result = "Print" then
:Report.Print("Invoice",query.filter,query.order)
Else if prompt_result = "Preview" then
:Report.Preview("Invoice",query.filter,query.order)
End if
Obviously, I am missing a setting somewhere although I am baffled as to where to find it. Any help would be appreciated.
Thank you.
Comment