When filling a Word template through SQL on Exact Online the following error occurs:
Publication failed.
Context:
value-of expression
16Hjjhhhasdhfjhasjhfjha;jsfhsahfdahskj;dhkhsdkjhskjhkKashdhasdjhjsahdjhjsadJashdkaskjdjsakdkjhDocumentnrKlantnrOffertedatum<invantive:value-of expression="$F{qtk.quotationnumber}" ***/><invantive:foreach> <invantive:value-of expression="$F{qtk.orderaccountcode}" /></invantive:foreach><invantive:foreach> <invantive:value-of expression="$F{qtk.quotationdate}
The location of the error is indicated by the marker '***'.
Evaluation of expression "$F{qtk.quotationnumber}" failed.
Cannot find field with the name 'quotationnumber'. Check that you have inserted a surrounding repeating block and that the field exists in that block.
The underlying SQL of the block in Composition for Word is:
select qtk.quotationnumber
, qtk.versionnumber
, qtk.quotationdate
, qtk.orderaccountcode
, acc.name
, acc.addressline1
, acc.postcode
, acc.city
, acc.countryname
, acc.phone
, acc.fax
, acc.vatnumber
, itm.code
, qtl.itemdescription
, qtl.notes
, qtl.quantity
, qtl.netprice
, qtl.amountdc
, qtl.vatpercentage*100
from exactonlinerest..Quotations Qtk
left
outer
join exactonlinerest..Accounts Acc
on acc.id = qtk.orderaccount
left
outer
join exactonlinerest..QuotationLines Qtl
on qtl.quotationid = qtk.quotationid
and qtl.quotationnumber = $P{P_OFFERTE}
and qtl.versionnumber = $P{P_VERSIE}
left
outer
join exactonlinerest..Items Itm
on itm.id = qtl.item
where qtk.status = 40
and qtk.quotationnumber = $P{P_OFFERTE}
and qtk.versionnumber = $P{P_VERSIE}
The SQL returns a list of quotations and their lines and items (articles) from Exact Online.
The content of the document is:
I've tried various options, but the error keeps appearing. What am I doing wrong?