Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel-exported report refers to the wrong cells

Status
Not open for further replies.

eksortso

Programmer
Jun 30, 2003
43
US
Hi,

I have a report that renders correctly in SQL Services 2005 Reporting Services. It contains two tables, and one of the tables has textboxes that refer to values in textboxes in both tables, via the ReportItems() function.

When I export this report to an Excel workbook, the system sees the ReportItems() function, names the cells used in the calculations, and produces expressions to reproduce the calculations on the original report.

For instance:
Textbox3's expression is:
=ReportItems("Textbox1").Value+ReportItems("Textbox2").Value

After exporting, Textbox3 is in cell B40, and its formula is:
=_411 + _412
where, respectively, the names "_411" and "_412" refer to cells B38 and B39, which correspond to Textbox1 and Textbox2 on the report.

At least, it's supposed to do that. But the exported version of my reports always mislabel the cells, so that calculations are not correct. The formula in cell B40 sums the values in B35 and B36 instead of B38 and B39.

I can get around this by not using ReportItems() and duplicating the expressions in the referenced values. That makes maintenance more difficult, though, and Excel exports do not produce formulas, which would be convenient for the reports users.

Anyone know how to fix the problem, so that we can export to Excel and get the right cell formulas? Or is this not possible?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top