I have built a bound grid that has a column called [SALES] and there is a summary with a Key called [TotalSales]
I added an unbound column called [PerOfSales] that uses the following calculation with CalcManager
[SALES] / [TotalSales()] and is formated as a percent ###,0.00%
It displays on the grid as advertised, but when I go to export it to Excel, it bombs with an error on that field.
"A binary operator in the formula is missing an operand after it.Portion with error: B2 / "
OK, I can understand that it is being sent to Excel with a formula it does not understand. SO, I change the ExportFormulas to False and then I get complete garbage in Excel.
So, now I am relinquished to having to build loops and formulas on the CellExported to add the formulas so the user sees the same thing on the grid, which is not much different from just using the grid and interop I was before I bought this product.
Sent it to support and after a day and a half got back to format the cells on the CellExported Event, um NOT. It is not a formating error. I do computations off of summaries all of the time, and if it can't export that, it was a big WASTE of money and I will go back to DEV Express grids and compute on the way in again.
What am I missing here?
Hi,
I'm sorry this is giving you trouble. You should not have to jump through hoops to get this to work, the exporter should be properly converting the grid formula into a formula that excel can understand. So the initial error here indicates a problem.
I just tested this out with a small sample project and I am getting the same error. This is pretty clearly a bug in the ExcelExporter and it has nothing to do with the formatting - the formula is not getting properly converted from the grid to Excel.
I am forward this thread to the Developer Support team so they can write this up for developer review and get it fixed.
tdoster,
I've reassigned the support case you had logged to another Developer Support Engineer to follow up on this. As Mike mentioned, this looks like it'll require our developers to review and to likely fix.
Again... if you can provide a small sample project demonstrating the issue so we can see it, we would be happy to take a look at it. But without being able to see the problem, there's not much we can do.
This was fixed in 10.3, but it seems to be broken again in 11.2. I have even tried applying SR 20112.2004 and it is still happening.
Hm. Unbound columns should not cause a problem either. If they are, it's a bug.
Can you reproduce the issue in a small sample project so we can check it out?
It is a literal named reference, however there are a lot of other things going on in my grid. For instance, I have a lot of unbound columns which the user enters values for and these aren't being exported either. If I use ExportFormulas = false then everything is fine. Having the formulas in the sheet isn't of much concern, I just need the values.
Thanks
Any NamedReferences defined on the CalcManager component that is referenced by a formula in the grid should be exported to Excel (into a hidden worksheet) so that the grid formula in Excel can use it.
If this is not working, it may be a separate bug. But note that the the NamedReference in this case would have to be a single literal value. If the NamedReference refers to other controls outside the grid or other NamedReferences, it will not work, since those other controls won't exist in the exported Excel sheet.
If you can provide a small sample project demonstrating this not working, I would be happy to check it out.