在 Exact Online 上通过 SQL 填充 Word 模板时,会出现以下错误:
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.
Composition for Word 中块的底层 SQL 是:
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}
SQL 从 Exact Online 返回一个引用列表及其行和项目(文章)。
我尝试了各种选项,但错误不断出现。我究竟做错了什么?