I have a macro where I apply a complex filter (Customer Name) to my report and then try to grab a BO variable value (Customer ID) that is uniques to the Customer Name). When I try this using the following code,
I get a Runtime error 206: #multivalue error message
Call boReport.AddComplexFilter("PARENT_CUST_NAME", "=<PARENT_CUST_NAME>=" & Chr(34) & vAccount & Chr(34))
boReport.ForceCompute
sAcctID = ThisDocument.Evaluate("=<PARENT_CUST_ID>", Val(boCell))
Does any one know how to fix this? I’ve tried many other properties besides “val”, but I keep gettign the same error message.
My existing macro basically does the same thing, but the piece that I can’t get (that example does address it) is how can a pull another value from the report in? Using that sample, you’ve created a filter on Resorts. Now what if you wanted to pull in the resort ID into your macro?
Meaning the Resort ID value that matches the Resort that you have already selected?
That, I’m afraid, is not really possible. What I have resorted to in the past (pun intended) is to export the data provider (or possibly a report) to a text file, then read that text file into an array using VBA. As an array, I can reference the entire row.
BusinessObjects doesn’t give you the capability to do a vlookup() or hlookup() type of function, unfortunately.
I ended up creating a Report variable that took the “Resort Name” value and concatonated “~Resort ID” and brought all of these values into an array. When I’m looping through the ResortNames array, I can now just grab the same # in the array for ResortNAME&ResortID (after parsing to the “~”. These match because they have the same sort order - that’s why I had to concatonate the Resort Name rather than just bring in ID alone - otherwise the two arrays ar out of sync.