Quantcast
Channel: Adobe Community : Popular Discussions - Reporting
Viewing all articles
Browse latest Browse all 38309

Calling a function in a function

$
0
0
I am trying to call a function in a function (CF Report Builder 7) and I always got an error. As far as I know, it is suppose to be very simple and I keep it simple but since I work with re-usable function, I try to apply this method as well in CF Report Builder to create report with more sense than just use CFDOCUMENT.

It seems that everytime I am using the amp to add on a string, it generates an error. Why? It is very standard to use a variable such as: <cfset vReturn = "As of " & fGetAsof()>.

Thank you in advance for any help!

Here is the code from the first function - Report.fGetReportTitle3()

<cfset vReturn = "">
<cfset vReturn = "As of " & report.fGetReportAsOf>
<cfreturn vReturn>

Here is the code for the second function - Report.fGetReportAsOf()

<cfset vAsOfTemp = CreateDate(query.dtYear, query.dtMonth, 1)>
<cfset vAsOfTemp = DateAdd("d", -1, DateAdd("m", 1, vAsOfTemp))>
<cfset vReturn = "" & DateFormat(vAsOfTemp, "d mmmm yyyy")>
<cfreturn vReturn>

Please note:
query.dtYear is an integer that contain just the year (e.g. 2007).
query.dtMonth is an integer that contain the month integer value (e.g. 1 will means January, 2 will means Ferbuary and so on until 12 for December).

Viewing all articles
Browse latest Browse all 38309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>