I have a quoting system for international sales. I have 2 Price Schedule reports, one for metric and one for SAE, that contain 36 bitmap objects for the currency symbol the user selects in the sequence of generating a Price Schedule report. The bitmap objects are named "bitmap_01" through "bitmap_36". This is a multiple user app, so I have a folder - USERS - containing subfolders named for each user (their system login username), each containing a file named - currency_symbol.bmp. When the user selects the country for the currency symbol for the report, the selected country's currency symbol is copied to their folder file - currency_symbol.bmp. The literal filename currently for all 36 bitmap objects on the reports is [PathAlias.ADB_Path]\Currency_symbol.bmp. This points to a dummy file so the report has a file to "see" when it is opened, otherwise an error fires. Then I have the report OnPrintInit event loop through each bitmap object on the report and change the the filename pointer to the users currency file using the following UDF:
This works fine, so far, but i have these questions:
1) in multiuser environment, will there be a conflict with the report pointing the bmp files to a common dummy bmp file when two users simultaneously open the same report?
2) Is there a more robust, easier, more elegant-preferable method to accomplish this?
Thanks
Code:
FUNCTION proj_prcs_rprt_bmp_set AS C (report_type as C) ' This function contains the parameter for the report type , either metric or SAE ' This allows for any variances in the number of BMP objects between the report types if needed later ' This addresses the proper number of BMP_xx objects within the specific report and ' dynamically changes the report bmp object filenames to be pointed to the selected ' USER\currency_symbol.bmp image through the global variable vg_rep_curr_symbl_file ' created in the Price Schedule sequence calling script - currency_select_dlg() dim vn_bmp_count as n dim vbmpw as C dim vreport as C if report_type="SAE" vn_bmp_count=36 vreport="r_proj_prices_SAE" else vn_bmp_count=36 vreport="r_proj_prices_metric" end if for i = 1 to vn_bmp_count vbmpw=padl(alltrim(str(i)),2,"0") evaluate_template(":"+vreport+":Bitmap_"+vbmpw+".bitmap.filename = "+quote(vg_rep_curr_symbl_file)) next END FUNCTION
1) in multiuser environment, will there be a conflict with the report pointing the bmp files to a common dummy bmp file when two users simultaneously open the same report?
2) Is there a more robust, easier, more elegant-preferable method to accomplish this?
Thanks
Comment