La Web del Programador: Comunidad de Programadores
 
    Pregunta:  61772 - COMO CREAR DW EN EJECUCION PERO A PARTIR DE UN STORE
Autor:  Roberto Karlo Salazar Pulache
Quiero mostrar un Reporte que crece tanto horizontal como vertical, he aqui porque uso un store.
ahora este Datawindow lo quiero crear en tiempo de ejecución con la opción dw.create(), pero no lo estoy logrando.

  Respuesta:  Cristian Aro Silva
a la opcion dw.create le debes pasar un string con la definicion de la misma.

el string debe ser algo asi, donde ls_procedimiento es el nombre del SP y V_RUT y V_ID_EMPRESA son los parametros de entrada del SP, de tipo String y numerico respectivamente :

ls_SQL_DW = 'release 9;' + char(13)+char(10)
ls_SQL_DW += 'datawindow(units=0 timer_interval=0 color=1073741824 processing=1 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 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.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes hidegrayline=no grid.lines=0 )' + char(13)+char(10)
ls_SQL_DW += 'header(height=72 color="536870912" )' + char(13)+char(10)
ls_SQL_DW += 'summary(height=0 color="536870912" )' + char(13)+char(10)
ls_SQL_DW += 'footer(height=0 color="536870912" )' + char(13)+char(10)
ls_SQL_DW += 'detail(height=84 color="536870912" )' + char(13)+char(10)
ls_SQL_DW += 'table(column=(type=number updatewhereclause=yes name=valor dbname="valor" )' + char(13)+char(10)
ls_SQL_DW += ' procedure="1 execute '+Upper(ls_procedimiento)+';0 V_RUT = :V_RUT, V_ID_EMPRESA = :V_ID_EMPRESA" arguments=(("V_RUT", string),("V_ID_EMPRESA", number)) )' + char(13)+char(10)
ls_SQL_DW += 'text(band=header alignment="2" text="0" border="0" color="33554432" x="9" y="8" height="56" width="274" html.valueishtml="0" name=compute_0001_t visible="1" font.face="Arial" font.height="-8" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )' + char(13)+char(10)
ls_SQL_DW += 'column(band=detail id=1 alignment="1" tabsequence=32766 border="0" color="33554432" x="9" y="8" height="68" width="274" format="[general]" html.valueishtml="0" name=compute_0001 visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-8" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )' + char(13)+char(10)
ls_SQL_DW += 'htmltable(border="1" )' + char(13)+char(10)
ls_SQL_DW += 'htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )' + char(13)+char(10)
ls_SQL_DW += 'export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )' + char(13)+char(10)
ls_SQL_DW += 'import.xml()' + char(13)+char(10)
ls_SQL_DW += 'export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )' + char(13)+char(10)