Hello,
I am currently working on a report for our sales department to list outstanding invoices. To do this, I have created a new data cube where the data source is the query below. This query returns approximately 150 rows.
SELECT
r.Kontrahent,
v.STRINGVALUE as Responsible,
r.Typ_transakcji,
r.Klucz_zadania,
r.Numer_faktury,
r.Kontrahent as Firma,
r.Data_platnosci,
r.Data_sprzedazy,
r.Data_wystawienia,
r.wartNetto,
r.wartBrutto,
r.Pozostalo_do_zaplaty,
Additional = 1,
r.Dzial,
datediff(day,r.Data_platnosci, Convert(DATE, GetDate())) as DayDiff
FROM [jira_prod].[dbo].[dk_hmf] r, [jira_prod].[dbo].customfieldvalue v
WHERE
customfield = (select f.id from [jira_prod].[dbo].customfield f where f.cfname = 'Responsible')
and v.issue = (select i.id from [jira_prod].[dbo].jiraissue i where i.project = (select p.id from [jira_prod].[dbo].project p where p.pkey = SUBSTRING (r.Klucz_zadania, 1, CHARINDEX('-',r.Klucz_zadania ) -1 ) ) and i.issuenum = SUBSTRING (r.Klucz_zadania, CHARINDEX('-',r.Klucz_zadania) +1, LEN(r.Klucz_zadania) ))
and r.klucz_zadania != 'brak informacji'
AND r.Data_wystawienia >= '2021-12-31'
and r.Pozostalo_do_zaplaty > 0
and r.Data_platnosci < Convert(DATE, GetDate())
and r.Dzial not like '%DOZ%'
The returned values are mapped as follows.
My report is configured as in the screenshot below.
The problem is that the report does not generate at all, and I get the following message.
There was error when performing your request. Please retry or go other page.
Any idea what is wrong? I don’t understand why the “Nr zadania” hierarchy level member returns over 4k records when the source query returns about 150 rows.
Thanks