Page 1 of 1
Error need help CHUNK?
Posted: Thu Feb 27, 2014 8:50 am
by blairetabay
error
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"]
is there something wrong with my code?
blaireTabay
Re: Error need help CHUNK?
Posted: Thu Feb 27, 2014 9:02 am
by Simon
Hi blaireTabay,
You should really go over the lessons here:
http://lessons.runrev.com/
Look up the property "text" in the dictionary.
Simon
Re: Error need help CHUNK?
Posted: Thu Feb 27, 2014 9:24 am
by blairetabay
this is my code that i get an error of a chunk. am i doing the right code?
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
Re: Error need help CHUNK?
Posted: Thu Feb 27, 2014 9:35 am
by Simon
Do you have a field named "txt_id"? or txt_f
Which one?
Simon
Re: Error need help CHUNK?
Posted: Thu Feb 27, 2014 10:02 am
by blairetabay
Simon,
I have those field in my card.
Re: Error need help CHUNK?
Posted: Thu Feb 27, 2014 11:39 am
by splash21
blairetabay wrote:
button "btnPrint": execution error at line 35 (Chunk: no such object) near "txt_id", char 4
what does it mean?
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..
Code: Select all
put field "txt_id" of card "Home" into sample["sample2"]