{"id":1021,"date":"2008-10-12T23:04:26","date_gmt":"2008-10-13T06:04:26","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/books\/?p=1021"},"modified":"2008-10-12T23:04:26","modified_gmt":"2008-10-13T06:04:26","slug":"913-timer-function","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/913-timer-function\/","title":{"rendered":"9.13 Timer Function"},"content":{"rendered":"<h2>Timer<\/h2>\n<p>The Timer function returns the number of seconds that have elapsed since midnight. This can be used for doing performance evaluations. Unfortunately, it is only significant to the nearest second. So it is only useful for analyzing reports that have lengthy run times. The following code demonstrates timing how long it takes a report to run.<\/p>\n<p>In the report Header put the following formula:<\/p>\n<p>         <code>BeforeReadingRecords<\/code><br \/>\n         <code>Global StartTime as Number<\/code><br \/>\n         <code>StartTime = Timer<\/code><br \/>\n         <code>Formula = \"\"\t\u2018A necessary evil that won't affect the calculation<\/code><\/p>\n<p>In the report Footer put the following formula:<\/p>\n<p>         <code>WhilePrintingRecords<\/code><br \/>\n         <code>Global StartTime as Number<\/code><br \/>\n         <code>Formula = Timer - StartTime<\/code><br \/>\n         <code>\u2018This returns the number of seconds it took to run the report<\/code><\/p>\n<h1>Other Functions<\/h1>\n<p>Although this chapter and the last two have listed many useful functions, Basic syntax still has many more to choose from. You&#8217;ve seen all the primary ones and I&#8217;m going to leave the remaining ones for you to explore on your own.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Timer The Timer function returns the number of seconds that have elapsed since midnight. This can be used for doing performance evaluations. Unfortunately, it is only significant to the nearest second. So it is only useful for analyzing reports that have lengthy run times. The following code demonstrates timing how long it takes a report [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,40],"tags":[],"class_list":["post-1021","post","type-post","status-publish","format-standard","hentry","category-chapter-9-built-in-functions","category-crystal-reportsnet-2008","entry"],"_links":{"self":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/1021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/comments?post=1021"}],"version-history":[{"count":0,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/1021\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}