Customer replaced their computer so it was necessary to install the runtime and setup the application on the new computer (w7 64bit). Since then, they get this error everytime they run a report (any report selected from the dialog box) but only when they preview the report; if they print the report there is no error. The code has not changed in a long long time. There are several other people at the same company using the same application without issue. There is another 'test' application on this machine using this same code and it has no issue. I don't know what it's not finding. I thought maybe an alias that I had setup for a report directory; but no - that's not it.
2015-07-15_06h29_46.png
Here's the code:
'Create an XDialog dialog box to prompt for parameters.
DIM SHARED vReports as C
DIM SHARED xBox as C
auto_list_vReports = a5.report_enum(2)
temp_count = w_count(auto_list_vReports,crlf())
DELETE a_vReports
DIM a_vReports[temp_count] as c
a_vReports.initialize(auto_list_vReports)
a_vReports.sort()
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
xBox = ui_dlg_box("Select a report...",<<%dlg%
{region}
Report:| [%v%.37vReports^=a_vReports];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%)
IF xBox <> "Ok"
END
END IF
''This section for possible future custom filters
SELECT
CASE vReports = "Customer Contact List"
CASE vReports = "Driver Pay Report"
CASE vReports = "Driver Pay Register"
CASE vReports = "Freight Rate Listing"
CASE vReports = "Monster Spreadsheet"
CASE vReports = "State Listing"
CASE vReports = "Supplier Cost History"
END SELECT
'Preview a report, label, letter, form or browse layout. You can specify which records to preview.
query.filter = ".t."
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(vReports,query.filter,query.order)
ELSE IF prompt_result = "Preview" THEN
:Report.Preview(vReports,query.filter,query.order)
END IF
END FUNCTION
2015-07-15_06h29_46.png
Here's the code:
'Create an XDialog dialog box to prompt for parameters.
DIM SHARED vReports as C
DIM SHARED xBox as C
auto_list_vReports = a5.report_enum(2)
temp_count = w_count(auto_list_vReports,crlf())
DELETE a_vReports
DIM a_vReports[temp_count] as c
a_vReports.initialize(auto_list_vReports)
a_vReports.sort()
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
xBox = ui_dlg_box("Select a report...",<<%dlg%
{region}
Report:| [%v%.37vReports^=a_vReports];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%)
IF xBox <> "Ok"
END
END IF
''This section for possible future custom filters
SELECT
CASE vReports = "Customer Contact List"
CASE vReports = "Driver Pay Report"
CASE vReports = "Driver Pay Register"
CASE vReports = "Freight Rate Listing"
CASE vReports = "Monster Spreadsheet"
CASE vReports = "State Listing"
CASE vReports = "Supplier Cost History"
END SELECT
'Preview a report, label, letter, form or browse layout. You can specify which records to preview.
query.filter = ".t."
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(vReports,query.filter,query.order)
ELSE IF prompt_result = "Preview" THEN
:Report.Preview(vReports,query.filter,query.order)
END IF
END FUNCTION
Comment