ColdFusion Report Builder 9 Using MySQL query's
Hey Everyone
I have been pulling my hair out for several days with this, I have all of the Adobe ColdFusion 9 dev books, and Google returns a cluster of information that doesnt seem to work. I was hoping someone could help me out here.
So what I did was open query builder in Adobe ColdFusion 9 Report Builder, I clicked the icon at the top that says report query and placed the following mySQL information, which works fine.
| MySQL |
|---|
select name.soc_sec, name.last_name, name.first_name, nmcrs.course,nmcrs.crs_txt AS Course_Title ,practicl.day_cod,CAST(practicl.start_hr AS VARCHAR(2)) + ':' + CAST(practicl.start_min AS VARCHAR(2)) AS Start_Time, |
Now I place my fields where I want them in the desgner, I double click the field to open the expression builder and all I have to type is something like query.Start_Time
When I run the report it lists all of the start times that match my criteria.
good
So my trouble is, I would like to use an if statement to make something happen based on the start time and cant get it to work. I have tried using <cfscript> <cfif> <cfquery> if, IIF, nothing works, mainly because once I use one of those tags it no longer recognizes the query.Start_Time.
I was wondering if someone could give me an example on how to do this like
<cfif (query.Start_Time) IS '12:0'>
query.Start_Time = '12.00'
</cfif>
or
<cfscript>
if(query.Start_Time == '12:0')
{
query.Start_Time = '12:00';
}
</cfscript>
I mean I know thats wrong and Its probably not that simple but all I need is a simple example to work off of and one would be greatly appreciated. Or even an example in the mySQL info I provided would work too. Please Help
Thanks
Shawn
