none
crystal report RRS feed

  • Question

  • hi, i wanna know if it's possible RESOLVE These two problems in crystal report

    i have one table A with PK CODICE and another table b in which there is a foreign key CODICE (called numinc)

    the query A is this

    SELECT ALL TGESI_SINISTRI.CODICE,  TO_CHAR(TGESI_SINISTRI.DATAORA,'DD/MM/RRRR') AS DATA_INCIDENTE, TGESI_SINISTRI.KM, TGESI_TRATTE.DESCRIZIONE AS TRATTA,
    TGESI_CARREGGIATE.DESCRIZIONE AS CARREGGIATA,
    DECODE(TGESI_RAPPCOA.NUMREG||'/'||TGESI_RAPPCOA.PROGREG ,'/','',TGESI_RAPPCOA.NUMREG||'/'||TGESI_RAPPCOA.PROGREG) AS NUMREG,
    TGESI_SINISTRI.COD_ENTE AS COD_ENTE
    FROM TGESI_SINISTRI, TGESI_RAPPCOA ,TGESI_CARREGGIATE,TGESI_TRATTE
    WHERE TGESI_SINISTRI.CODICE=TGESI_RAPPCOA.CODICE (+)
    AND TGESI_SINISTRI.COD_ENTE=TGESI_RAPPCOA.COD_ENTE  (+)

    AND TGESI_SINISTRI.CARREGGIATA=TGESI_CARREGGIATE.CODICE(+)
    AND TGESI_SINISTRI.COD_ENTE=TGESI_CARREGGIATE.COD_ENTE  (+)

    AND TGESI_SINISTRI.TRATTA=TGESI_TRATTE.CODICE(+)
    AND TGESI_SINISTRI.COD_ENTE=TGESI_TRATTE.COD_ENTE  (+)

    AND TGESI_SINISTRI.COD_ENTE={?P_ENTE}
    AND TGESI_SINISTRI.DATAORA  BETWEEN TO_DATE({?P_DA_DATA},'DD/MM/RRRR')  AND TO_DATE( {?P_A_DATA},'DD/MM/RRRR')
    ORDER BY TGESI_SINISTRI.CODICE

    the query b is this

    SELECT CODUFF
             FROM TGESI_SINOPEREUFF
             WHERE COD_ENTE = {?p_ente}
               AND NUMSINISTRO = -->i would that that the "b" query takes :codice from "a" query in the same report--->{@q_incidenti.CODICE} for example

    and i would that for each codice iN WHICH I have two involved office  it join me the row before printing the page i.e.

    FROM THIS

    codice              DATA_INC  km    AUTOSTRADA    CARREGGIATA   RAPPORTO  CHIUSO  UFF COIN*

    L0001/2007   01/01/2007   55,7  SES-LIV            NORD               1/1               SI           1

    L0001/2007   01/01/2007   55,7  SES-LIV            NORD               1/1               SI           9

    TO ONE ROW

    L0001/2007   01/01/2007   55,7  SES-LIV            NORD               1/1               SI           1-9-->CONCATENATED FIELDS

    BEST REGARDS


    • Edited by squeezed69 Monday, May 7, 2012 3:16 PM
    Monday, May 7, 2012 9:48 AM