This past weekend we moved all our Sesame files, programs and data, to a new partition on the server, separating it from the operating system files. So far everything has been working well after a few tweaks of shortcuts and etc.
However, one of our reports is crashing the Sesame program with a "Divided by zero" error. I've figured out that what's causing it is a hard-coded @Xlookup() command in the programming of the report which retrieves the total of the previous year's billing in the same month from a database that lives outside our main application (for example, running it this month should retrieve January 2011's totals). This is the command:
MonthTotal = @ToMoney(@XLookup("C:\Sesame\Miara\MonthTotals.db", @Year(@Date) - 1, "Year", @Month$(@Date)))
As you can see, this report, which runs in our Invoice database, looks into an external database called MonthTotals, which used to live on the C: drive. It now lives on the F: drive, but rather than just prolong the problem by hard-coding F:, I would like to merge the MonthTotals database into our main application to live alongside Invoice and the others.
That's easy enough. What I need help with is transforming the @XLookup() command into an XLU() command. It's been a few years since I coded XLookups, and I'm having trouble with this.
Any help would be appreciated. Thanks.