Powerbuilder pour les completement Geeks !

Le forum (ô combien francophone) des utilisateurs de Powerbuilder.

Recherche rapide

Annonce

Certaines rubriques, dont des cours, sont uniquement visibles par les membres du forum ^^.
Dans la rubrique Liens & Références, vous avez accès à un sommaire de téléchargement, profitez-en !
Il existe maintenant un nouveau TOPIC "Votre CV en Ligne" accessible uniquement par demande.

#1 29-05-2006 10:14:47

Piliers  
Membre
Date d'inscription: 29-05-2006
Messages: 10
Pépites: 49
Banque: 0

Crosstab

Est-il possible d'avoir plusieurs valeurs dans un crosstab par ligne/colonne ?
Et est-il possible d'imprimer facilement un crosstab issu d'une datawindow ?

Merci
Piliers

Hors ligne

 

#2 29-05-2006 12:44:01

pick ouic  
La bourse ou la vie ^^
Award: gearotter
Lieu: Massy-Verrières
Date d'inscription: 29-05-2006
Messages: 4658
Pépites: 942
Banque: 2,147,483,647
Site web

Re: Crosstab

pour l'impression de la datawindow, juste ce bout de code à mettre : dw_crosstab.print()
dans ta datawindow, n'oublies pas de mettre le type d'impression : portrait ou paysage.

sinon, voila une crosstab que j'ai fait recemment,
ca pourrait peut etre repondre à ta question ?

j'ai une datawindow de type crosstab, appelé par une procédure stockée...
http://img519.imageshack.us/img519/2567/dwcrosstab2gq.th.jpg

voila ce que ramene ma procédure stockée :
http://img519.imageshack.us/img519/3497/proccrosstab6eq.th.jpg

et voila le resultat final ! un affichage dynamique...
http://img508.imageshack.us/img508/1301/modulesparfonction9lp.th.jpg



je te file la datawindow au cas ou, version pb7 :

Code: pb

$PBExportHeader$d_p_audit_module_fct_bg_detail.srd
$PBExportComments$Datawindow pour l'état audit de la matrice des modules par fonction
release 7;
datawindow(units=0 timer_interval=0 color=1090519039 processing=4 HTMLDW=no print.documentname="" print.orientation = 1 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no  crosstab.dynamic = yes grid.lines=0 grid.columnmove=no selected.mouse=no )
header[1](height=0 color="536870912" )
header[2](height=56 color="536870912" )
header[3](height=52 color="536870912" )
header[4](height=96 color="536870912" )
summary(height=0 color="536870912" )
footer(height=56 color="536870912" )
detail(height=56 color="536870912" )
table(column=(type=char(20) updatewhereclause=yes name=code_module dbname="code_module" )
 column=(type=char(20) updatewhereclause=yes name=libelle_module dbname="libelle_module" )
 column=(type=char(20) updatewhereclause=yes name=module_ferme dbname="module_ferme" )
 column=(type=char(20) updatewhereclause=yes name=code_fonction_type dbname="code_fonction_type" )
 column=(type=char(20) updatewhereclause=yes name=cr_fafct dbname="cr_fafct" )
 procedure="1 execute dbo.p_audit_module_fct_bg;1 @nom_module = :nom_module, @module_ouvert = :module_ouvert, @code_famille_fct = :code_famille_fct" arguments=(("nom_module", string),("module_ouvert", string),("code_famille_fct", string))  sort="code_module A libelle_module A module_ferme A " )
text(band=header[2] alignment="2" text="" border="0" color="0" x="9" y="0" height="56" width="553"  name=t_5  font.face="Arial" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[2] alignment="2" text="Code familles de fonctions" border="0" color="0" x="567" y="0" height="56" width="837"  name=t_1  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[2] alignment="2" text="" border="0" color="0" x="1413" y="0" height="56" width="151"  name=t_7  font.face="Arial" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[2] alignment="2" text="@cr_fafct" border="0" color="0" x="1573" y="0" height="56" width="96"  name=t_3 visible="1~tif(rowcount()>0,1,0)"  font.face="Arial" font.height="-7" font.weight="700"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[3] alignment="2" text="" border="0" color="0" x="9" y="0" height="56" width="553"  name=t_6  font.face="Arial" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[3] alignment="2" text="Code fonction type" border="0" color="0" x="567" y="0" height="56" width="837"  name=t_2  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[3] alignment="2" text="" border="0" color="0" x="1413" y="0" height="56" width="151"  name=t_8  font.face="Arial" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[3] alignment="2" text="@code_fonction_type" border="0" color="0" x="1573" y="0" height="56" width="96"  name=t_4 visible="1~tif(rowcount()>0,1,0)"  font.face="Arial" font.height="-7" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[4] alignment="2" text="Code module" border="0" color="0" x="9" y="0" height="104" width="549"  name=code_module_t  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[4] alignment="2" text="Libellé module" border="0" color="0" x="567" y="0" height="104" width="837"  name=libelle_module_t  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
text(band=header[4] alignment="2" text="Ouvert
Fermé" border="0" color="0" x="1413" y="0" height="104" width="151"  name=module_ferme_t  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="31909606" )
column(band=detail id=1 alignment="0" tabsequence=32766 border="0" color="33554432" x="9" y="0" height="52" width="549" format="[general]"  name=code_module edit.limit=20 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.autohscroll=yes  font.face="Arial" font.height="-7" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="0" color="33554432" x="567" y="0" height="52" width="837" format="[general]"  name=libelle_module edit.limit=40 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.autohscroll=yes  font.face="Arial" font.height="-7" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="2" tabsequence=32766 border="0" color="33554432" x="1413" y="0" height="52" width="151" format="[general]"  name=module_ferme edit.limit=1 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.autohscroll=yes  font.face="Arial" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=4 alignment="2" tabsequence=32766 border="0" color="33554432" x="1573" y="0" height="52" width="96" format="[general]"  name=code_fonction_type visible="1~tif(rowcount()>0,1,0)" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.autohscroll=yes crosstab.repeat=yes  font.face="Arial" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=footer alignment="0" expression="today()"border="0" color="0" x="9" y="4" height="48" width="549" format="dd/mm/yyyy hh:mm"  name=date_1  font.face="Arial" font.height="-7" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
compute(band=footer alignment="0" expression="'Page ' + page() + ' / ' + pageCount()"border="0" color="0" x="567" y="4" height="48" width="837" format="[general]"  name=page_1  font.face="Arial" font.height="-7" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
 crosstab(band = foreground  crosstabonly = yes 
 columns = "cr_fafct, code_fonction_type" rows = "code_module, libelle_module, module_ferme" values = "if (count(code_fonction_type for crosstab) > 0,'X','')" sourcenames = "code_module, libelle_module, module_ferme, code_fonction_type, cr_fafct")
sparse(names="code_module  libelle_module")htmltable(border="0" cellpadding="1" cellspacing="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )

Connaitre son ignorance est une grande part de la connaissance.
http://animegifs.free.fr/anime/mazinger/mazinger.gif

Hors ligne

 

#3 30-05-2006 15:09:01

Doctor Z  
Moderador
Award: PanchoeNacho
Lieu: Vale Figueira (Lisbonne)
Date d'inscription: 30-05-2006
Messages: 756
Pépites: 1,003,082
Banque: 877,135,234,297,804

Re: Crosstab

Piliers a écrit:

Est-il possible d'avoir plusieurs valeurs dans un crosstab par ligne/colonne ?
Et est-il possible d'imprimer facilement un crosstab issu d'une datawindow ?

Merci
Piliers

BONJOUR,

Un peu hors sujet, mais tu n'as pas dû lire les règles du forum ... Un petit bonjour,
c'est gratuit et cela motive les gens encore plus à aider ...


http://www.userbars.com/i/543606.gif
Olivença, l'oubliée
Si tu es alentejane, que Dieu te bénisses, si tu ne l'es pas, que Dieu te pardonnes.

Hors ligne

 

Pied de page des forums

Propulsé par FluxBB 1.2.22