If someone is still interested with this, I developed solution for that, it can be considered ugly but it let me escape many pain in my experience with SSRS.
For those who wants detailed description of ideas (I think its needed anyway because the solution is not so obvious): https://github.com/GrafGenerator/ssrs-formularize.
In short: this is custom rendering extension, which intended to hide ExcelRE from SSRS (Formularizer uses ExcelRE under the hood), and trigger formulas processing when needed. The idea is to mark some report items with "anchors", and then in other report items write textual formulas in special simple DSL that will link to cells with anchors after excel doc is generated.
Important: anchor and formulas added to report item's Action URL, as it seems the only report item field that can be accessed when rendering extension is working without breaking functionality (we can send almost anything here is cook it right way).
So, words report items "has anchor" or "has formula" means that report item action set to URL and expression =code.EncodeFormula("current item identitier (anchor)", "current item formula")
Sample steps are (with table):
- Did once per SSRS instance: compile binaries and install to SSRS per instructions in repository.
- Strict: Add custom function to your report: https://github.com/GrafGenerator/ssrs-formularize/blob/master/encode-function.vb
- Strict: Add custom property to report - key is "formularize", value can be any
table row has report items (textboxes) txtA, txtB and txtC.
4.1 txtA has anchor comp_value
4.2 txtB has anchor output_value
4.3 txtC has formula IF({cell 'comp_value' row} > 0, {cell 'output_value' row}, "N/A").
Result in excel file is formula IF(A1 > 0, B1, "N/A") for first row, row numbers 2 for second row, 3 for third and so on.
- The same is for
column and all scopes. More examples are on project github page.
I hope this helps someone, feel free to ask question and post issues to the github repo.