Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 20764

SSRS Report no longer loading after database reindexing

$
0
0

We recently had utility maintenace done on our database where our tables were reindexed. After this one of my datasets with a lot of joins stopped working. The query runs when in the query designer but when I go to preview the report it'll run until I get the message "Report Cancelled by User". I didn't changeanything between before the indexing and after. The other items/reports work fine except this one. The query is eating up a lot of memory. Also the report has 3 subreports on it if that matters.

SELECT
ip.fopmemo,
im.fprice,
sr.funetprice,
sr.fdelivery,
id.fonhand as IDfonhand,
jd.flead_tim,
jd.fnsimulops, 
i.fsub_from,
i.createddate,
sm.forderdate,
ji.fdescmemo,
i.fjobno as Job,
i.ftype as [Type],
i.fpartno as [Part No],
i.fpartrev as [Part Rev],
si.fcustpart as [Cust Part],
i.fac [Fac],
si.manualplan [Manual Plan],
im.fgroup [fGroup],
im.fprodcl [Prodcl],
im.fbuyer  [fnbuyer],
im.fnusrqty1 [fnurst],
im.fonhand [fonhand],
im.fbook [fbook],
im.fonhand-im.fbook as OverShort,
im.fproqty   as IMfproqty,
im.fonorder,
ji.fdesc [fdesc],
jd.foperno [foperno],
jp.flastoper [flastoper],
i.fstatus [status],
i.fcus_id [fcus_id],
sm.fcontact [fcontact] ,
sm.fsono [SMfsono],
sm.fcustpono [fcustpono],
iw.fdept [fdept],
jd.fpro_id [fpro_id],
jd.fdescnum [fdescnum],
jd.fccharcode [fccharcode],
i.fsono [Ifsono],
ji.finumber, 
jb.fltooling,
jb.fbompart,
MIN(i.ftduedate) over (Partition by jb.FBOMPART) as EarliestDate,
i.fnusrcur1,
i.fdusrdate1,
i.flisapl,
i.ftduedate ,
i.frel_dt,
i.fddue_date,
sr.fduedate,
i.fquantity,
jd.foperqty,
jd.fnqty_comp,
jd.fnqty_move,
jd.fnqty_togo,
jd.fcomp_date,
jd.fuprodtime,
jd.flschedule, 
ji.fshipqty,
sr.fshipmake,
i.fstrt_date,
im.fbin1,
im.flocate1,
im.fcusrchr1,
im.fcusrchr2,
im.fcusrchr3,
im.fnusrqty1,
ix.flocate1 as IXflocate,
ix.fbin1 as IXfbin1,
ix.fcusrchr1 as IXfcusrchr1,
ix.fcusrchr2 as IXfcusrchr2,
ix.fcusrchr3 as IXfcusrchr3,
ix.fdusrdate1 as IXfdusrdate1,
row_number() over (Partition by jb.FBOMPART  Order by i.ftduedate, jb.FBOMPART, i.FPARTNO, i.FDDUE_DATE) as tempGroup
FROM jomast i
LEFT JOIN joitem ji ON i.fjobno=ji.fjobno 
LEFT JOIN jopest jp ON i.fjobno=jp.fjobno 
LEFT JOIN jodrtg jd ON i.fjobno=jd.fjobno
left join inopds ip on jd.fdescnum=ip.fdescnum  
LEFT JOIN jodbom jb ON i.fjobno = jb.fjobno and 1=jb.fltooling  
LEFT JOIN inmastx ix ON jb.fbompart=ix.fpartno 
LEFT JOIN somast sm ON i.fsono =sm.fsono 
LEFT JOIN soitem si ON ji.fsono+ji.finumber=si.fsono+si.finumber 
LEFT JOIN sorels sr ON ji.fsono+ji.finumber+ji.fkey=sr.fsono+sr.finumber+sr.frelease 
LEFT JOIN inmast im ON i.fpartno+i.fpartrev=im.fpartno+im.frev 
LEFT JOIN inwork iw ON jd.fpro_id=iw.fcpro_id
LEFT JOIN inonhd id ON im.fpartno = id.fpartno and 'Z3' = id.flocation
WHERE i.flisapl=1 and
LEFT(i.fstatus,1)<>'C' and iw.fdept='02' AND jd.flschedule=1
ORDER BY [fdescnum], i.frel_dt, i.fddue_date, Job
OPTION (MERGE JOIN, HASH JOIN)


Viewing all articles
Browse latest Browse all 20764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>