Report Grid with OQL Dataset

0
Hi – can someone get me started on how to create a report joining two entities together? In this case, I also want to add an “if-then-else” expression as part of my select statement, which I know I can do through SQL as a case-when. I googled and couldn’t find an example of joining multiple entities in a report grid through OQL and a dataset, and using a case-when/if-then-else type of expression in the select statement (I also would need to use %CurrentUser% in my “where” clause which I assume is possible). Thanks for any tips you can provide. 
asked
3 answers
0

You could just have an association between the two or more entities and then use conditional display logic in the data view to show the attributes you are interested in.

answered
0

Hi – in this case, I need to sum some fields and then divide the sums by user. So I’m thinking OQL is my best bet?

answered
0

I created OQL recently and able to run report.

Below is the example of Query…

select  
        INVITE.InviteCode AS InviteCode, 
        INVITE.CustomerEmail AS CustomerEmail 
        CUSTOMER.CompanyName As CompanyName 
  FROM ABC_Customer.Invite  INVITE 
LEFT OUTER JOIN INVITE/ABC_Customer.Invite_CustomerAccount/ABC_Customer.CustomerAccount AS CUSTOMER 
where 1=1
and ( INVITE.DateSent>=(Select max(Reporting.ReportSearch.InviteCreationStartDate)
  from  Reporting.ReportSearch where Reporting.ReportSearch/Reporting.ReportSearch_User='[%CurrentUser%]'
 ) or (Select max(Reporting.ReportSearch.InviteCreationStartDate)
  from  Reporting.ReportSearch)=NULL  )  

answered