I am creating monthly reports in excel and not very good at creating this kind of reports.I have two forms A, B
user 1 created 10 documents with company X using form A (If same username+companyname+formname+Type then I want just one company name but I need 10 document totals)
user 1 created 3 documents with company Y using Form B (three seperate entites in excel)
User 2 created 4 documents with company abc using Form A
user2 created 2 documents with company ghi using form B
check, check1 are the values of field “result” field from Form A
Field result is a dialoglist with values as open, close
Check2 is the field in form A
review, Review1 are the fields from Form B
Have increment the counter if value is selected.
Ex: for user 1 6documents has check value is “open”
I want to show the result in excel in this format
User Company check check1 check2 review review1 Total
User1 X 6 4 10 20
user1 Y 1(review) 1(review1) 2
user1 y 1(review) 1
user1 y 1(review) 1(review1) 2
-- -- -- -- -- --
user1 ToTal 6 4 10 3 2 26
user2 abc 1 3 4 4
user2 ghi 1(review) 1
user2 ghi 1(review) 1(review1) 2
-- -- -- -- -- --
user2 Total 1 3 4 2 1 7
Based on the search criteria I am getting the docuemnt collection but after that i don’t know how to export it to excel in above given format.
Please provide some code to solve this.