When creating a report, SSRS does not see all Columns
For performance reasons (from 4 mins down to 20 seconds) I Insert data
into #MRE for 4 columns, then add the two columns for the second table. I
then perform an update on #MRE. Due to the indexes we use on our tables
this is the most performant method. (My first version simply joined these
two tables together, but it ran over 4 min for a small test case)
I have tested it stand alone in T SQL (2008 R2). It works. When I connect
my dataset in VS 2012 it does not see/display the two columns from second
table. (OrderTotal and PaymMode)
Is there a way to enable VS 2012's SSRS to see these other two columns?
create table #MRE
(
CreatedBy nvarchar(5),
SalesID nvarchar(20),
SourceID nvarchar(20),
--OrderTotal numeric(28,12),
--PaymMode nvarchar(10),
SalesStatus nvarchar (30)
)
ALTER TABLE #MRE
ADD OrderTotal numeric(28,12)
ALTER TABLE #MRE
ADD PaymMode nvarchar(10)
UPDATE #MRE
SET #MRE.OrderTotal = pt.[AMOUNT],
#MRE.PaymMode = pt.[PAYMMODE]
FROM #MRE
join JSCUSTPAYMTABLE pt
on #MRE.SalesID = pt.SALESID
where #MRE.SalesID = pt.SALESID
and pt.DATAAREAID='mkc'
No comments:
Post a Comment