button "btnPrint": execution error at line 35 (Chunk: no such object) near "txt_id", char 4
what does it mean?
Code: Select all
put fld "txt_id" into sample["sample2"]
blaireTabay
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
put fld "txt_id" into sample["sample2"]
Code: Select all
local sCurrentRecord
local sLastRecord, sample
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
put AbsolutePath ("tabaySample.qrl") into tLayoutFile
put the long ID of me into tDataBroker
put true into tShowPreview
qrtReports_PrintReport tLayoutFile, tDataBroker, tShowPreview
MyPrintReport
end mouseUp
on MyPrintReport tShowPreview
put 1 into sCurrentRecord
#the error point here at this line this is the same way putting up a value.
put fld "txt_f" into sample["sample2"]
put fld "txt_f" into sample["sample3"]
put fld "txt_f" into sample["sample4"]
end MyPrintReport
--on MyPrepNextDetail
--end MyPrepNextDetail
function qrtReports_endOfReport
-- we've reached the end if we've passed our last record
return (sCurrentRecord > sLastRecord)
end qrtReports_endOfReport
on qrtReports_moveNextRecord
-- update our sCurrentRecord local variable
add 1 to sCurrentRecord
-- and fill up the detail data
#MyPrepNextDetail
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
Hi, blairetabay. It means that there's no field called "txt_id". If the field is on another card or something similar and not visible to the script, adding the card name to the reference can help..blairetabay wrote: button "btnPrint": execution error at line 35 (Chunk: no such object) near "txt_id", char 4
what does it mean?
Code: Select all
put field "txt_id" of card "Home" into sample["sample2"]