Hi, I have the following dataset in a report I'm writing. It is built in the "Edit in Text" query builder.[code="sql"]SELECT DISTINCT trans.tncy_sys_ref AS 'TncySysRef' ,ten.tenancy_ref AS 'TenancyRef' ,trans.trans_date AS 'TransactionDate' ,dat.Month AS 'StartMonth' ,dat.MonthEnd AS 'EndMonth' ,trans.created_date AS 'CreatedDate' ,trans.comment_ AS 'TransactionComment' ,trans.posting_week AS 'PostingWeek' ,trans.posting_year AS 'PostingYear' ,trans.trans_week AS 'TransactionWeek' ,trans.trans_year AS 'TransactionYear' ,trans.trans_amt AS 'TransactionAmount' ,trans.account_type AS 'AccountType' ,trans.account_code AS 'AccountCode' ,loc.scheme AS 'Scheme' ,loc.mgt_area AS 'Management Area' ,loc.location_type AS 'Location Type'FROM [dbo].[re_tncy_trans] trans INNER JOIN re_tenancy ten ON trans.tncy_sys_ref = ten.tncy_sys_ref INNER JOIN re_tncy_place tenpl ON TEN.tncy_sys_ref = tenpl.tncy_sys_ref INNER JOIN ih_location loc ON tenpl.place_ref = loc.place_ref INNER JOIN [InSightOpenHousingDataWarehouse].[dbo].[DimWhen] dat ON trans.trans_date = dat.DateWHERE trans.account_type IN ('IN','HB')AND trans.trans_date >= CONVERT(DATETIME, '2014-04-01 00:00:00', 102)--and tenancy_ref = '211506045028'[/code]When I paste that in the query editor and execute it - the query runs successfully. When I run the report with this dataset the report errors with a generic error - [b]An error has occured during report processing. (rsProcessingAborted)Query execution failed for dataset 'DataSet1' (rsErrorExecutingCommand)For more information about this error navigate to the report server on the local machine, or enable remote errors.[/b]I can trace the issue to the join to another database - [code="sql"]INNER JOIN [InSightOpenHousingDataWarehouse].[dbo].[DimWhen] dat ON trans.trans_date = dat.Date[/code]When I remove this part and the bit in the SELECT statement that looks at this table the report runs.Does this mean that in report builder I can't have a query across databases?I've tried adding a datasource to that database to the report and it still doesn't work.Please advise as I have key dates in this database that I need to look at.Thanks
↧