| Autor |
Mensaje |
alberto Miembro |
# Publicado: 27 Sep 2007 09:38
Hola de nuevo,
¿Cómo puedo añadir la siguiente condición? (con alguna pista me valdría...qué ficheros modificar, etc)
Supongamos que quiero sacar en i_albaranescli.kut las líneas que tienen idlinea múltiplo de 4 (es un ejemplo). Entonces, en SQL sería:
AND MOD(lineasalbaranescli.idlinea,4) = 0
¿Cómo puedo incluir esto?
Muchas gracias a todos y a InfoSial enhorabuena por el producto y esta página.
|
mathias Miembro |
# Publicado: 27 Sep 2007 11:31
Just don't know, what you want to do exactly, but principally you put it in the
<where>
</where>
tags of the .qry
or have a look at the filter statements in
function oficial_establecerConsulta in flfactinfo.qs
If you only want to display 4 items you should perhaps rather use LIMIT?
|
alberto Miembro |
# Publicado: 27 Sep 2007 12:10
Hi Mathias,
I'll try to explain what I want to do...
We need print a tickets (etiquetas, pegatinas) page from albaran. Something like this:
producto1 producto2 producto3
ingredients ingredients ingredients
xxx kg xxxx kg xxx kg
producto4 producto5 producto6
ingredients ingredients ingredients
xxx kg xxxx kg xxx kg
...and so on, depending on how many lines has the albaran selected.
For this, I have created a new table 'etiquetaslineasalbaran' that is filled when insert / delete lineasalbarancli. This is made 'through' triggers and the records in the table are always well-ordered, reorderíng field 'linea' when insert / delete:
idalbaran linea producto kg.
----------- ----- ---------- ----
4 0 produc1 2
4 1 produc2 3
...etc. For each albaran the field linea start in 0. This question now is done. If you want more details I can paste de triggers...
Then, I'm trying to create a .kut where the sql is:
select a.*, b.*, c.*
from etiquetaslineasalbaran a, etiquetaslineasalbaran b, etiquetaslineasalbaran c
where a.idalbaran = 4 (selected in the list)
and a.idalbaran = b.idalbaran
and a.idalbaran = c.idalbaran
and mod(a.linea, 3) = 0
and b.linea = a.linea + 1
and c.linea = c.linea + 2
Then I can print in the <detail> of the .kut this record like I want...
Sorry for my english and thank you!
|
jro
|
# Publicado: 28 Sep 2007 14:46
Hola Alberto,
como dice Mathias, hay que tocar el script que llama a la impresión. Si miras flfactinfo.qs:
function lanzarInforme(cursor:FLSqlCursor, nombreInforme:String, orderBy:String, groupBy:String, etiquetas:Boolean, impDirecta:Boolean, whereFijo:String, nombreReport:String, numCopias:Number, impresora:String)
el paŕametro whereFijo permite añadir condiciones el select de la consulta
esta función se llama, para los albaranes, en masteralbaranescli.qs (desde oficial_imprimir):
flfactinfo.iface.pub_lanzarInforme(curImprimir, "i_albaranescli");
tendrías que poner:
var miWhere:String = " AND bla bla bla";
flfactinfo.iface.pub_lanzarInforme(curImprimir, "i_albaranescli", "", "", false, false, miWhere);
Un saludo,
Jesús
|