Le forum (ô combien francophone) des utilisateurs de Powerbuilder.
Bonjour,
Je souhaite appliquer un modify à un computed field.
w_export.dw_export.modify("aff_article.Expression='Blé. Analyse par Humidité'")
Voici l'erreur qui m'est retournée :
Line 1 Column 36: incorrect syntax.
Je ne comprend pas ce qui ne lui plaît pas....Avez vous une idée??
D'avance merci
Dernière modification par djeckelle (19-08-2008 13:51:10)
Hors ligne
Il faut proteger ta string avec des double quotes, sinon, c'est interprete comme un numerique...
w_export.dw_export.modify("aff_article.Expression='~"Blé. Analyse par Humidité~"'")
Hors ligne
Cortex,
Je viens de tester ta proposition et j'ai toujours une erreur..je en vois pas de quoi ça peut venir.
Line 1 Column 23: incorrect syntax
...
Hors ligne
djeckelle a écrit:
Cortex,
Je viens de tester ta proposition et j'ai toujours une erreur..je en vois pas de quoi ça peut venir.Line 1 Column 23: incorrect syntax
...
Halala... J'ai toujours beaucoup apprecie ces messages d'erreur bien explicites...
Bon, tu peux m'envoyer la syntaxe de la datawindow que tu utilise ici, ainsi que ta version de PowerBuilder (+ le build siouplé)
Allez, on y crois!
Hors ligne
Ok..
Alors je suis sous PB 7.0.2 Build 8046
La syntax de ma datawindow est :
release 7; datawindow(units=3 timer_interval=0 color=80269524 processing=0 print.documentname="" print.orientation=0 print.margin.left=4000 print.margin.right=635 print.margin.top=635 print.margin.bottom=635 print.paper.size=0 print.paper.source=0 selected.mouse=no) header(height=502 color="536870912" ) summary(height=0 color="-1" ) footer(height=0 color="-1" ) detail(height=396 color="536870912" ) table(column=(type=char(30) updatewhereclause=yes name=ccode_externe dbname="ccode_externe" ) column=(type=char(20) updatewhereclause=yes name=nom_tiers dbname="nom_tiers" ) column=(type=date updatewhereclause=yes name=date_facture dbname="date_facture" ) column=(type=char(10) updatewhereclause=yes name=numero_facture dbname="numero_facture" ) column=(type=number updatewhereclause=yes name=quantite dbname="quantite" ) column=(type=char(10) updatewhereclause=yes name=nom_unite dbname="nom_unite" ) column=(type=number updatewhereclause=yes name=bonification dbname="bonification" ) column=(type=number updatewhereclause=yes name=deduction dbname="deduction" ) column=(type=number updatewhereclause=yes name=complement_total dbname="complement_total" ) column=(type=decimal(10) updatewhereclause=yes name=prix_unit dbname="prix_unit" ) column=(type=number updatewhereclause=yes name=montant_total dbname="montant_total" ) column=(type=char(10) updatewhereclause=yes name=unite1 dbname="unite1" ) column=(type=decimal(10) updatewhereclause=yes name=prix_unit_net dbname="prix_unit_net" ) column=(type=char(20) updatewhereclause=yes name=article_nom_article dbname="nom_article" ) column=(type=number updatewhereclause=yes name=qte_unite_1 dbname="qte_unite_1" ) column=(type=number updatewhereclause=yes name=equivalence_ref_unite1 dbname="equivalence_ref_unite1" ) column=(type=char(30) updatewhereclause=yes name=aff_criteres dbname="aff_criteres" ) retrieve=" SELECT ~"ligne_facture_vente~".~"ccode_externe~", ~"tiers~".~"nom_tiers~", ~"en_tete_facture_vente~".~"date_facture~", ~"en_tete_facture_vente~".~"numero_facture~", ~"ligne_facture_vente~".~"quantite~", ~"ligne_facture_vente~".~"nom_unite~", ~"ligne_facture_vente~".~"bonification~", ~"ligne_facture_vente~".~"deduction~", ~"ligne_facture_vente~".~"complement_total~", (isnull(((~"ligne_facture_vente~".~"montant_total~" / ~"ligne_facture_vente~".~"quantite~") - ~"ligne_facture_vente~".~"bonification~" + ~"ligne_facture_vente~".~"deduction~"), 0)) as Prix_Unit, ~"ligne_facture_vente~".~"montant_total~", ~"article~".~"unite1~", (isnull(((~"ligne_facture_vente~".~"montant_total~" + ~"ligne_facture_vente~".~"complement_total~") / ~"ligne_facture_vente~".~"quantite~"), 0)) as Prix_Unit_Net, ~"article~".~"nom_article~", (~"ligne_facture_vente~".~"quantite~" * equivalence_ref / equivalence_ref_unite1) as qte_unite_1, (SELECT equivalence_ref FROM unite key join unite_article UA WHERE UA.code_article = article.code_article AND UA.defaut = 'o') as equivalence_ref_unite1, :criteres as aff_criteres FROM {oj ~"en_tete_facture_vente~" LEFT OUTER JOIN ~"ligne_facture_vente~" ON ~"en_tete_facture_vente~".~"code_facture~" = ~"ligne_facture_vente~".~"code_facture~"}, ~"tiers~", ~"mouvement_lot~", ~"lot~", ~"article~", ~"unite~" WHERE ( ~"tiers~".~"code_tiers~" = ~"en_tete_facture_vente~".~"code_tiers~" ) and ( ~"mouvement_lot~".~"code_mouv~" = ~"ligne_facture_vente~".~"code_mouv~" ) and ( ~"lot~".~"code_lot~" = ~"mouvement_lot~".~"code_lot~" ) and ( ~"article~".~"code_article~" = ~"lot~".~"code_article~" ) and ( ~"unite~".~"nom_unite~" = ~"ligne_facture_vente~".~"nom_unite~" ) and (~"en_tete_facture_vente~".~"type_facture~" = 'l' OR ~"en_tete_facture_vente~".~"type_facture~" = 'd') AND ~"lot~".~"code_article~" = :code_article AND ~"en_tete_facture_vente~".~"date_facture~" >= :date_debut AND ~"en_tete_facture_vente~".~"date_facture~" <= :date_fin AND ~"unite~".~"unite_ref~" = 'n' AND ~"unite~".~"type_unite~" = 'r' " arguments=(("code_article", number), ("date_debut", date), ("date_fin", date), ("criteres", string)) sort="categorie A, nom_tiers A, date_facture A" ) group(level=1 header.height=449 trailer.height=476 by=("code_article" ) header.color="536870912" trailer.color="-1" ) group(level=2 header.height=370 trailer.height=79 by=("categorie" ) header.color="536870912" trailer.color="-1" ) text(name=t_1 visible="1 if(isnull( date_debut ), 0, 1)" band=header font.charset="0" font.face="Arial" font.family="2" font.height="-10" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" alignment="0" border="0" x="6905" y="2248" height="476" width="423" text="du" ) text(name=date_debut band=header font.charset="0" font.face="Arial" font.family="2" font.height="-10" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" alignment="2" border="0" x="7620" y="2248" height="476" width="1984" text="" ) text(name=t_2 visible="1 if(isnull( date_debut ), 0, 1)" band=header font.charset="0" font.face="Arial" font.family="2" font.height="-10" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" alignment="0" border="0" x="9842" y="2248" height="476" width="423" text="au" ) text(name=date_fin band=header font.charset="0" font.face="Arial" font.family="2" font.height="-10" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" alignment="2" border="0" x="10530" y="2248" height="476" width="1984" text="" ) text(name=t_3 band=header font.charset="0" font.face="Arial" font.family="2" font.height="-18" font.italic="1" font.pitch="2" font.weight="400" background.mode="1" background.color="553648127" color="0" alignment="0" border="0" x="5503" y="476" height="767" width="7117" text="ANALYSE DES VENTES" ) text(name=nom_article band=header font.charset="0" font.face="Arial" font.family="2" font.height="-14" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" alignment="2" border="0" x="1799" y="1349" height="608" width="15689" text="" ) compute(name=aff_article_criteres band=header font.charset="0" font.face="Arial" font.family="2" font.height="-12" font.italic="1" font.pitch="2" font.weight="700" background.mode="2" background.color="16777215" color="0" x="52" y="0" height="502" width="21801" format="[General]" expression="article_nom_article + if( criteres = ~"~", ~"~", ~". Analyse par ~" ) + criteres" alignment="0" border="0" crosstab.repeat=no ) column(name=ccode_externe tag="" band=detail id=1 x="185" y="27" height="343" width="3598" color="0" border="0" alignment="0" format="[general]" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=30 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Courier New" font.family="1" font.height="-8" font.pitch="1" font.weight="400" tabsequence=0 ) column(name=nom_tiers band=detail id=2 x="3889" y="27" height="343" width="2936" color="0" border="0" alignment="0" format="[general]" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=20 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=date_facture band=detail id=3 x="7037" y="27" height="343" width="1640" color="0" border="0" alignment="2" format="[general]" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=numero_facture band=detail id=4 x="8916" y="27" height="343" width="1322" color="0" border="0" alignment="0" format="[general]" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=10 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=quantite band=detail id=5 x="10424" y="27" height="343" width="1217" color="0" border="0" alignment="1" format="#0.00 " edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=nom_unite band=detail id=6 x="11747" y="27" height="343" width="952" color="0" border="0" alignment="0" format="[general]" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=10 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=prix_unit band=detail id=10 x="12805" y="27" height="343" width="1084" color="0" border="0" alignment="1" format="#,##0.00" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=bonification band=detail id=7 x="14102" y="27" height="343" width="1084" color="0" border="0" alignment="1" format="#,##0.00" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=montant_total band=detail id=11 x="17012" y="27" height="343" width="1534" color="0" border="0" alignment="1" format="#,##0.00" edit.autohscroll=no edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="553648127" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=complement_total tag="" band=detail id=9 x="18758" y="27" height="343" width="1164" color="0" border="0" alignment="1" format="#,##0.00" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=prix_unit_net band=detail id=13 x="20505" y="27" height="343" width="1084" color="0" border="0" alignment="1" format="#,##0.00" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=deduction band=detail id=8 x="15451" y="0" height="343" width="1084" color="0" border="0" alignment="1" format="#,##0.00" edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="400" tabsequence=0 ) compute(name=categorie visible="1 0" band=detail font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" x="21960" y="0" height="370" width="3386" format="[GENERAL]" expression="Mid(ccode_externe, 1, 2)" alignment="0" border="0" crosstab.repeat=no ) rectangle(name=r_1 band=header.1 pen.style="0" pen.width="26" pen.color="0" brush.hatch="7" brush.color="553648127" background.mode="2" background.color="0" x="105" y="0" height="449" width="21669" ) text(name=ligne_facture_vente_ccode_externe_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="687" y="53" height="370" width="2381" text="Critère de vente" ) line(name=l_1 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="3783" y1="27" x2="3783" y2="423" ) text(name=tiers_nom_tiers_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="4947" y="53" height="343" width="846" text="Client" ) line(name=l_2 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="6958" y1="27" x2="6958" y2="423" ) text(name=en_tete_facture_vente_date_facture_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="7567" y="53" height="343" width="635" text="Date" ) line(name=l_3 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="8784" y1="27" x2="8784" y2="423" ) text(name=en_tete_facture_vente_numero_facture_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="8969" y="53" height="343" width="1164" text="Numéro" ) line(name=l_4 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="10371" y1="27" x2="10371" y2="423" ) text(name=ligne_facture_vente_quantite_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="10477" y="53" height="343" width="1217" text="Quantité" ) line(name=l_5 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="11721" y1="27" x2="11721" y2="423" ) text(name=t_4 band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" alignment="2" border="0" x="11826" y="53" height="343" width="820" text="Unité" ) line(name=l_6 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="12673" y1="27" x2="12673" y2="423" ) text(name=cprix_unit_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="13017" y="53" height="343" width="529" text="P.U." ) line(name=l_7 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="13864" y1="27" x2="13864" y2="423" ) text(name=ligne_facture_vente_bonification_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="14181" y="53" height="343" width="820" text="Bonif." ) line(name=l_8 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="15292" y1="27" x2="15292" y2="423" ) text(name=ligne_facture_vente_deduction_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="15610" y="53" height="343" width="978" text="Déduc." ) line(name=l_9 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="16853" y1="27" x2="16853" y2="423" ) text(name=t_5 band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" alignment="2" border="0" x="17277" y="53" height="343" width="978" text="TOTAL" ) line(name=l_10 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="18573" y1="27" x2="18573" y2="423" ) text(name=ligne_facture_vente_complement_total_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="18864" y="53" height="343" width="1031" text="Compl." ) line(name=l_11 band=header.1 background.mode="2" background.color="0" pen.style="0" pen.width="26" pen.color="0" x1="20187" y1="27" x2="20187" y2="423" ) text(name=cprix_unit_net_t band=header.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" alignment="2" border="0" x="20452" y="53" height="343" width="1084" text="P.U. Net" ) line(name=l_13 band=trailer.1 background.mode="1" background.color="553648127" pen.style="0" pen.width="52" pen.color="0" x1="79" y1="450" x2="21748" y2="450" ) text(name=t_6 band=trailer.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" alignment="1" border="0" x="15531" y="27" height="343" width="978" text="TOTAL" ) compute(name=total_general band=trailer.1 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" x="16615" y="27" height="343" width="1931" format="#,##0.00" expression="sum(montant_total for all)" alignment="1" border="0" crosstab.repeat=no ) compute(name=total_qte_unite_1 band=header.2 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" x="10212" y="26" height="343" width="1428" format="#0.00 " expression="sum(qte_unite_1 for group 2)" alignment="1" border="0" crosstab.repeat=no ) column(name=unite1 band=header.2 id=12 x="11747" y="26" height="343" width="978" color="0" border="0" alignment="0" format="[general]" edit.autohscroll=no edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="553648127" font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" tabsequence=0 ) compute(name=moyen_pu band=header.2 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" x="12805" y="26" height="343" width="1084" format="#,##0.00" expression="sum(quantite * prix_unit for group 2) / total_qte_unite_1" alignment="1" border="0" crosstab.repeat=no ) compute(name=total_montant_total band=header.2 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" x="17012" y="26" height="343" width="1534" format="#,##0.00" expression="sum(montant_total for group 2)" alignment="1" border="0" crosstab.repeat=no ) compute(name=moyen_pu_net band=header.2 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" x="20478" y="26" height="343" width="1084" format="#,##0.00" expression="sum(quantite * prix_unit_net for group 2) / total_qte_unite_1" alignment="1" border="0" crosstab.repeat=no ) compute(name=categorie_visible band=header.2 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" x="185" y="26" height="343" width="9921" format="[GENERAL]" expression="''" alignment="0" border="0" crosstab.repeat=no ) compute(name=lib_categorie band=header.2 font.charset="0" font.face="Arial" font.family="2" font.height="-8" font.pitch="2" font.weight="700" background.mode="1" background.color="553648127" color="0" x="3810" y="26" height="343" width="5212" format="[GENERAL]" expression="/* f_rechercher_libelle_valeur_critere( ccode_externe , 2 ) */" alignment="0" border="0" crosstab.repeat=no ) line(name=l_12 band=trailer.2 background.mode="1" background.color="553648127" pen.style="0" pen.width="26" pen.color="0" x1="79" y1="26" x2="21748" y2="26" ) htmltable(border="1" ) htmlgen(clientComputedFields="1" clientEvents="1" clientFormatting="0" clientScriptable="0" clientValidation="1" generateJavaScript="1" )
Pour infos :
Dans mon modify le nom de la colonne est aff_article_criteres et non aff_article comme je l'ai écrit dans les post précédents
Mon enchyaînement de code est le suivant :
Je rempli un tableau de chaîne pour constituer mon modify
//Déclaration string ls_tab_modify[], ls_tab_null[], ls_err integer li_nb_dim, li_cpt //Initialisation ls_tab_modify = ls_tab_null //Affectation ls_tab_modify[1]= "DataWindow.Header.Height=502" ls_tab_modify[2]= "nom_article.Visible='0'" ls_tab_modify[3]= "t_1.Visible='0'" ls_tab_modify[4]= "t_2.Visible='0'" ls_tab_modify[5]= "t_3.Visible='0'" ls_tab_modify[6]= "date_debut.Visible='0'" ls_tab_modify[7]= "date_fin.Visible='0'" ls_tab_modify[8]= "aff_article.Expression='~"Blé. Analyse par Humidité~"'" // Je parcours le tableau et j'applique les modify li_nb_dim = UpperBound(ls_tab_modify) if li_nb_dim >0 then for li_cpt=1 to li_nb_dim if not isnull(ls_tab_modify[li_cpt]) then ls_err = w_export_datawindow.dw_export.modify(ls_tab_modify[li_cpt]) if ls_err <> "" then Messagebox("Problème de modify ", ls_err +", "nvo_export_data.uof_copier_datawindow", 43") end if next end if
Voilà tu as tous les éléments, j'ai essayé d'appliquer mon modify sur un autre champ, de supprimer les accents, les blancs, j'ai vérifier les quotes et doubles quotes......je ne sais plus quoi faire ... :errr:
:code=pb:
Dernière modification par djeckelle (19-08-2008 08:35:21)
Hors ligne
Autre info...j'arrive à modifier les autres propriétés de mon champ aff_article_critere par le même procédé
Hors ligne
djeckelle a écrit:
Dans mon modify le nom de la colonne est aff_article_criteres et non aff_article comme je l'ai écrit dans les post précédents
Mon enchyaînement de code est le suivant :Code: pb
... ls_tab_modify[8]= "aff_article.Expression='~"Blé. Analyse par Humidité~"'"Voilà tu as tous les éléments, j'ai essayé d'appliquer mon modify sur un autre champ, de supprimer les accents, les blancs, j'ai vérifier les quotes et doubles quotes......je ne sais plus quoi faire ...
Hum...
Comment te dire... Ben, j'ai essayé chez moi, ca marche tres bien... a condition de changer un tout petit rikiki détail de rien du tout: 'aff_article.Expression' -> 'aff_article_criteres.Expression'...
Tu meriterais presque des pepites pour avoir resolu ce post...
Hors ligne
Écoute dans mon code d'origine j'ai bien 'aff_article_criteres.Expression'...
J'ai écrit le post après mon code j'ai juste raccourci les noms pour le post
Le problème est ailleurs
Hors ligne
Ha...
Autant pour moi...
Moi qui croyais que tu avais copié directement ton code, et j'en avais deduis que la etait l'erreur puisque tu mettais dans ton tableau:
ls_tab_modify[8]= "aff_article.Expression='~"Blé. Analyse par Humidité~"'"
Faut reconnaitre que c'etait piégeux de modifier ton bout de code dans le post...
...et en plus j'avais juste le meme message que toi
Line 1 Column 23: incorrect syntax
1000 excuses djeckelle...
Sinon, je n'ai pas d'idée, j'ai copié telle quelle ta dw, idem pour ton script (mis a part le 'aff_article'). Et la, ca marche tres bien. Ok, je suis en PB 11, mais ca devrait marcher aussi, ici ca a l'air d'un bete probleme de syntaxe, c'est tout...
Desole et bon courage
Hors ligne
Ok merci quand même
Hors ligne
Bon et bien j'ai ajouté une zone text dont je modifie la propriété .text là ou je modifié mon expression.....
Je masque la compute et j'affiche le text à la place..pas terrible mais j'ai j' résultat que je voulais....
Hors ligne