3

Hi I am using BIRT and new also, and I stuck in this situation, Please anyone help to understand what wrong in my assumption..

enter image description here

The above image is my report layout, and i am trying to get three subject total, so with the help of computed columns javascript functions i have calculated the total,refer below image.

enter image description here

Actually i got the Total value as expected.(see below image for result)

enter image description here

My Question is I would like to have the Total with formula in excel sheet for my "Total with formula" field.

How can i achieve this, I have tried and googled one whole day for this, still not got any results.

From googling and reading some articles i got to know below things,

ExcelEmitter.ValueAsFormula = true //UserProperty for a label makes a formula and it will reflect in the BIRT excel report.

ExcelEmitter.DisplayFormula = true //for Sheets set to true.

Label value =[subject1][subject2][subject3]

I did the above two things and i didn't get the expected result.

What are the necessary things i need to do to get this formula in the BIRT excel sheet output..

EDIT

I tried set values as below and the result is not what i expected.. Layout enter image description here Userparameter

enter image description here

Result in Browser

enter image description here

If any websites or article that has a solution for this,then please share in this post.

Manikandan Arunachalam
  • 1,470
  • 3
  • 17
  • 32

1 Answers1

1

You need to create a few UserProperties on the label, such shown on the screen below.

enter image description here

This sample is available here. Take care there is a report parameter allowing to enable/disable the formula column, by default it is disabled. The real Excel formula is a little bit more complicated, i simplified it for the screenshot. This one allows to escape issues with row number and pagebreaks:

=INDIRECT("E"&ROW())/INDIRECT("C"&ROW())
Dominique
  • 4,272
  • 1
  • 16
  • 21
  • Is this reflects in your excelsheet report, can you make sure that and please post the image if it does. – Manikandan Arunachalam Feb 13 '15 at 04:37
  • What do you mean by it's not working? Is nothing displayed at all? Yes it reflects in the worksheet, with further complications though: in my context with xls format ('Excel native) it works fine in libreoffice, but with MS-Excel i have to 'save as' the file first to convert it and get formulas evaluated. I added a link to the report in the answer so that you can try it yourself. – Dominique Feb 13 '15 at 09:56
  • It refelects in the worksheet as =E3/C3 in all fields.Not value. – Manikandan Arunachalam Feb 13 '15 at 10:51
  • Which format do you use? Don't miss with Eclipse viewer we should **not** use 'Excel' export if formulas are needed, only *xls_spudsoft* and *xlsx* formats support this. Does it work if you 'save as' the file with Excel and then open it again? Otherwise i don't see what could be wrong, i hope someone else will be able to help. – Dominique Feb 13 '15 at 11:13
  • see my updation i followed ur things and in browser also its not reflecting the value. – Manikandan Arunachalam Feb 13 '15 at 11:22