Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using cfif statement in CF Report Builder

Guest
Jun 27, 2008 Jun 27, 2008
How can I use if statements when building a query within CF Report Builder?

Existing Code that doesn't work in the Report Builder Query:
Select *
FROM Issue_PrioritizationReport
WHERE 0=0
<cfif IsDefined("param.Team")> AND IssueTeamID IN (#Param.Team#)</cfif>
<cfif IsDefined("Param.TypeID")> AND IssueTypeID IN (#Param.TypeID#)</cfif>
<cfif Param.Ranked EQ 1> AND Rank <> ''</cfif>
ORDER BY <cfif Param.Sort EQ 'Default'>Rank, IssueID <cfelse> SortDueDate</cfif>
TOPICS
Reporting
914
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 30, 2008 Jun 30, 2008
LATEST
Hi,

In the SQL query panel (under Query builder wizard) (in where all the fields of your table gets listed) set the condition attribute of your "IssueTeamID" as "where" and put the "criteria" as "param.team" follow the same for "type" field too..

Test the query and confirm the required resultset is getting fetched.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources