Wednesday, March 7, 2012

Report is blank, but QA returns results

I've tested a query in Query Analyzer and it returns the desired results.
However, the same query in a SQL report finishes without errors but the
report is completely blank. Similarly formatted reports work fine. Here's the
query:
SELECT CRMAF_Task.modifiedonutc, CRMAF_Task.modifiedbyname,
CRMAF_Task.owneridname, CRMAF_Task.subject, CRMAF_Task.statecodename,
CRMAF_Task.description, CRMAF_Task.regardingobjectid,
CRMAF_Notes.subject AS NotesSubj, CRMAF_Notes.notetext AS NoteText,
CRMAF_Notes.createdonutc
FROM FilteredTask CRMAF_Task LEFT JOIN
FilteredAnnotation CRMAF_Notes ON
CRMAF_Task.activityid = CRMAF_Notes.objectid
WHERE (CRMAF_Task.subject LIKE '%reb%') AND
(CRMAF_Task.regardingobjectid = 'D5C79CEC-D3AF-DB11-86DF-0003FFDAF900') AND
(CRMAF_Task.statecode = 1)
Anyone have any ideas?
--
Matt Wittemann, CRM MVP
http://icu-mscrm.blogspot.comOn Feb 19, 6:12 pm, MattNC <Mat...@.discussions.microsoft.com> wrote:
> I've tested a query in Query Analyzer and it returns the desired results.
> However, the same query in a SQL report finishes without errors but the
> report is completely blank. Similarly formatted reports work fine. Here's the
> query:
> SELECT CRMAF_Task.modifiedonutc, CRMAF_Task.modifiedbyname,
> CRMAF_Task.owneridname, CRMAF_Task.subject, CRMAF_Task.statecodename,
> CRMAF_Task.description, CRMAF_Task.regardingobjectid,
> CRMAF_Notes.subject AS NotesSubj, CRMAF_Notes.notetext AS NoteText,
> CRMAF_Notes.createdonutc
> FROM FilteredTask CRMAF_Task LEFT JOIN
> FilteredAnnotation CRMAF_Notes ON
> CRMAF_Task.activityid = CRMAF_Notes.objectid
> WHERE (CRMAF_Task.subject LIKE '%reb%') AND
> (CRMAF_Task.regardingobjectid = 'D5C79CEC-D3AF-DB11-86DF-0003FFDAF900') AND
> (CRMAF_Task.statecode = 1)
> Anyone have any ideas?
> --
> Matt Wittemann, CRM MVPhttp://icu-mscrm.blogspot.com
That's a tough one. Have you tried refreshing the dataset and making
sure that you are not filtering out anything (if you're grouping in
the report)?
Enrique Martinez
Sr. SQL Server Developer|||In two things it should be empty.
1. If no error, but empty it means it is not satisfying the where
conditions. So just check the where conditions may be spelling etc...
2. you said the same query works in QA, then just check and re-check where
your datasource is connecting, is it pointing to the same database/table
where your QA also connects ' just check this.. I think that must be wrong...
Amarnath
"MattNC" wrote:
> I've tested a query in Query Analyzer and it returns the desired results.
> However, the same query in a SQL report finishes without errors but the
> report is completely blank. Similarly formatted reports work fine. Here's the
> query:
> SELECT CRMAF_Task.modifiedonutc, CRMAF_Task.modifiedbyname,
> CRMAF_Task.owneridname, CRMAF_Task.subject, CRMAF_Task.statecodename,
> CRMAF_Task.description, CRMAF_Task.regardingobjectid,
> CRMAF_Notes.subject AS NotesSubj, CRMAF_Notes.notetext AS NoteText,
> CRMAF_Notes.createdonutc
> FROM FilteredTask CRMAF_Task LEFT JOIN
> FilteredAnnotation CRMAF_Notes ON
> CRMAF_Task.activityid = CRMAF_Notes.objectid
> WHERE (CRMAF_Task.subject LIKE '%reb%') AND
> (CRMAF_Task.regardingobjectid = 'D5C79CEC-D3AF-DB11-86DF-0003FFDAF900') AND
> (CRMAF_Task.statecode = 1)
> Anyone have any ideas?
> --
> Matt Wittemann, CRM MVP
> http://icu-mscrm.blogspot.com|||Who are you running the query as in QA?
Since you are using filtered views, if you are not running as the same
user running the reports, it may be an issue of security.
On Feb 19, 7:12 pm, MattNC <Mat...@.discussions.microsoft.com> wrote:
> I've tested a query in Query Analyzer and it returns the desired results.
> However, the same query in a SQL report finishes without errors but the
> report is completely blank. Similarly formatted reports work fine. Here's the
> query:
> SELECT CRMAF_Task.modifiedonutc, CRMAF_Task.modifiedbyname,
> CRMAF_Task.owneridname, CRMAF_Task.subject, CRMAF_Task.statecodename,
> CRMAF_Task.description, CRMAF_Task.regardingobjectid,
> CRMAF_Notes.subject AS NotesSubj, CRMAF_Notes.notetext AS NoteText,
> CRMAF_Notes.createdonutc
> FROM FilteredTask CRMAF_Task LEFT JOIN
> FilteredAnnotation CRMAF_Notes ON
> CRMAF_Task.activityid = CRMAF_Notes.objectid
> WHERE (CRMAF_Task.subject LIKE '%reb%') AND
> (CRMAF_Task.regardingobjectid = 'D5C79CEC-D3AF-DB11-86DF-0003FFDAF900') AND
> (CRMAF_Task.statecode = 1)
> Anyone have any ideas?
> --
> Matt Wittemann, CRM MVPhttp://icu-mscrm.blogspot.com

No comments:

Post a Comment