License Error
Posted: Thu Mar 27, 2014 3:28 am
here is my code
Code: Select all
local sCurrentRecord
local sDetail, sDocument, sLastRecord,hem
local tLayoutFile, tDataBroker, tShowPreview
on mouseUp
put 1 into sCurrentRecord
if "qrtReportsLib" is not among the lines of the stacksInUse then
start using stack "qrtReportsLib"
end if
# here is my license goes here
put AbsolutePath ("hematology.qrl") into tLayoutFile
put the long ID of me into tDataBroker
put true into tShowPreview
qrtReports_PrintReport tLayoutFile, tDataBroker, tShowPreview
end mouseUp
#single record printing goes here
on MyPrintReport
put 1 into sCurrentRecord
put fld "txt_hemoglobin" into hem["hemoglobin"]
put fld "txt_hematocrit" into hem["hematocrit"]
put fld "txt_leutocrit" into hem["leukocyte"]
put fld "txt_difCount" into hem["diffCount"]
put fld "txt_stab" into hem["stab"]
put fld "txt_segmenter" into hem["segmeter"]
put fld "txt_lymphocytes" into hem["lymphocyetes"]
put fld "txt_eosinophil" into hem["eosinophil"]
put fld "txt_monocytes" into hem["monocytes"]
put fld "txt_thromCount" into hem["thrombocyte"]
put fld "txt_bloodType" into hem["bloodType"]
put fld "txt_RH" into hem["rh"]
put fld "txt_bsmp" into hem["bsmp"]
put fld "txt_bledTime" into hem["bleedingTime"]
put fld "txt_clotTime" into hem["clottingTime"]
put fld "txt_erythrocyte" into hem["esr"]
-- put fld "" into hem[""]
-- put fld "" into hem[""]
-- put fld "" into hem[""]
end MyPrintReport
#looping printing goes here
on MyPrepNextDetail
end MyPrepNextDetail
function qrtReports_endOfReport
-- we only have to print a single record
if sCurrentRecord > 1
then return true
else return false
end qrtReports_endOfReport
on qrtReports_moveNextRecord
-- merely update our sCurrentRecord local variable
#MyPrepNextDetail
MyPrintReport
add 1 to sCurrentRecord
end qrtReports_moveNextRecord
function qrtReports_valueOfExpression pExpression
-- this function will evaluate an expression and return the result
put pExpression into tExpression
replace "<QUOTE_REPLACEMENT>" with quote in tExpression
return value(tExpression)
end qrtReports_valueOfExpression
function AbsolutePath pRelativePath
## this helper function looks for files from the directory where the stack is saved
put the effective filename of this stack into tAbsolutePath
set the itemDelimiter to "/"
put pRelativePath into item -1 of tAbsolutePath
return tAbsolutePath
end AbsolutePath