Hi Ishana
The key question is which database you are using to generate the report. Your two options are OrderEntry or SalesAnalysis. No other database contains both customer and item details. SalesAnalysis is the easier database to work with, in fact you can generate the report you want using the online inquiry feature of SalesAnalysis without even bothering with GridView. But if you don't own that module, you are stuck with using OrderEntry.
Have you looked at the Items tab under History in OrderEntry? It very well may be able to give you what you want, and you can export the report to Excel with one click.
Let us know which database you are trying to use, and if the other options I mentioned can work for you.
Steve