Q:

What is the proper way to fill a form with multiple data fields?

I have been asked to create a vb.net WinForms app that automates the creation of this spreadsheet:

Obviously, creating that spreadsheet manually is a back breaking task.
I am very comfortable writing SQL to pull each individual field of data, however I've got to believe that there is a better way.  Such a method would require 144 queries !!
I've considered creating a form with individual labels for each field, or using a gridview.  Either would be acceptable to the end user, but I'm really not sure how I would write a query to produce a dataset that look like the end product anyway.
I'm not asking anyone to write any code for me, what I'm asking for help with is the concept of how I should attack this task.
Here is a query that I wrote which returns the fields for Business Unit #1 for the first week on the spreadsheet.  I don't think it helps much, but I'm adding it to show that I've put some effort into this.
DECLARE @WeekEnding AS DATE
DECLARE @DIV AS INT

SET @WeekEnding = '11/13/2015'
SET @DIV = 20

-- A/R downpayments OPCH
SELECT 
SUM(OPCH.DocTotal - OPCH.VatSum - OPCH.TotalExpns) AS 'ARDownPaymentInvoice'  

FROM OPCH 
LEFT JOIN INV1 ON OPCH.DocEntry = INV1.DocEntry AND INV1.VisOrder = 0
LEFT JOIN OITM ON INV1.ItemCode = OITM.ItemCode 
LEFT JOIN OITB ON OITM.ItmsGrpCod = OITB.ItmsGrpCod 
LEFT JOIN OACT AS CurrCode (NOLOCK) ON OITB.RevenuesAc = CurrCode.AcctCode 

WHERE DATEPART(WEEK, OPCH.DocDate) = DATEPART(WEEK, @WeekEnding) AND YEAR(OPCH.DocDate) = YEAR(@WeekEnding)
AND CurrCode.Segment_4 = @DIV

-- Credits ORIN 
SELECT 
SUM(ORIN.DocTotal - ORIN.VatSum - ORIN.TotalExpns) * -1 AS 'Credit'  

FROM ORIN 
LEFT JOIN INV1 ON ORIN.DocEntry = INV1.DocEntry AND INV1.VisOrder = 0
LEFT JOIN OITM ON INV1.ItemCode = OITM.ItemCode 
LEFT JOIN OITB ON OITM.ItmsGrpCod = OITB.ItmsGrpCod 
LEFT JOIN OACT AS CurrCode (NOLOCK) ON OITB.RevenuesAc = CurrCode.AcctCode 

WHERE DATEPART(WEEK, ORIN.DocDate) = DATEPART(WEEK, @WeekEnding) AND YEAR(ORIN.DocDate) = YEAR(@WeekEnding)
AND CurrCode.Segment_4 = @DIV

--Invoices
SELECT 
SUM(OINV.DocTotal - OINV.VatSum - OINV.TotalExpns) AS 'Invoice'  

FROM OINV 
LEFT JOIN INV1 ON OINV.DocEntry = INV1.DocEntry AND INV1.VisOrder = 0
LEFT JOIN OITM ON INV1.ItemCode = OITM.ItemCode 
LEFT JOIN OITB ON OITM.ItmsGrpCod = OITB.ItmsGrpCod 
LEFT JOIN OACT AS CurrCode (NOLOCK) ON OITB.RevenuesAc = CurrCode.AcctCode 

WHERE DATEPART(WEEK, OINV.DocDate) = DATEPART(WEEK, @WeekEnding) AND YEAR(OINV.DocDate) = YEAR(@WeekEnding)
AND CurrCode.Segment_4 = @DIV`

Thanks for any ideas.

A:

One way to achieve this:
CREATE TABLE #tmpData
(column1 varchar(50),
column2 varchar(50),
column3 varchar(50),
column4 varchar(50),
column5 varchar(50),
column6 varchar(50),
column7 varchar(50),
column8 varchar(50),
column9 varchar(50),
column10 varchar(50),
column11 varchar(50),
column12 varchar(50))

Then you could insert a row displaying the dates of each column
INSERT INTO #tmpData
   --Write your select query here for filling in all the dates

Then you would insert the data for each line item in the rows.
 INSERT INTO #tmpdata
 SELECT 'Business Unit 1', 
 -- insert remaining column data here

