As face586 was trying to say, nstead of using javascript to calculate a report value, you'll need to calculate it within the SQL that your report is based on.

I'm guessing that you're not familiar enough with Apex to realize that the report query really drives the results that show up on your report, doing all the heavy lifting. If you have a complex calculation to be done, it should probably be done in the database, rather than with javascript manipulating the report fields after the database has returned them.

I'm not sure, but I get the feeling you may be overthinking this. One of the main features of Apex is that you can achieve quite acceptable results without having to delve too deeply into the technology stack.

In order to create a multirow report, create a query that gives you the data you require, then use one of the wizards to create either a classic report or an interactive report, accepting defaults as you go through the wizard. Once you are comfortable with the wizard, you can then start exploring the various options that are available to you in the wizard process. After this you will then find there is a huge amount of options in the builder part of Apex for customising the look and feel and functionality of your report, all without having to touch a line of code, or maybe a line here or there.

Further to this, once again on the subject of look and feel, you can investigate the huge number of themes and template options that are available to you and if you feel more adventurous and if your HTML/CSS skills are up to it, you can start customising these. Finally, if you need to get specific results that don't seem to be catered for out of the box, you can investigate the world of plugins and javascript.

Yes, exactly that. Look at the example linked to above: Row Template 1 is displayed to start a new row group when the row template expression using column values computed in the query evaluates to true. If the row template expression is false, then the default Row Template 2 is used.

Here's another example (Row Template with rowspan II) that uses analytics in a diferent way to provide report breaks using rowspan.