IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

SAGE Discussion :

Portail SAGE X3 V11 Affichage du contenu d'un CLOB sur le portail


Sujet :

SAGE

  1. #1
    Candidat au Club
    Homme Profil pro
    Consultant ERP
    Inscrit en
    Septembre 2017
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Consultant ERP

    Informations forums :
    Inscription : Septembre 2017
    Messages : 1
    Points : 4
    Points
    4
    Par défaut Portail SAGE X3 V11 Affichage du contenu d'un CLOB sur le portail
    Bonjour,

    Nous souhaitons afficher le contenu d'un CLOB (Compte-rendu de réunionen texte formaté RTF) résultat d'une requête SQL sur le portail X3.

    Nous avons plusieurs problèmes:
    - Dans le requêteur graphique et dans le requêteur SQL, il n'est pas possible d'ajouter les champs CLOB en sortie de requête. Les champs CLOB sont "invisible" donc non sélectionnable. Pourquoi ? Y-a-t-il un moyen de les rendre visible et donc de les ajouter à la requête

    - Pour pallier à ce premier problème, nous avons "casté" le CLOB en chaine alphanumérique, c'est fonctionnel mais l'affichage contient tous le formatage RTF qui rend le texte illisible.

    D'où mes questions:
    - Y-a-t-il un moyen simple d'afficher les CLOBs sur le portail
    - Si non, peut-on utiliser une fonction X3 pour convertir du texte enrichie en texte brut ?

    Merci de votre réponse!

  2. #2
    Nouveau membre du Club
    Homme Profil pro
    Développeur décisionnel
    Inscrit en
    Octobre 2014
    Messages
    22
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Italie

    Informations professionnelles :
    Activité : Développeur décisionnel

    Informations forums :
    Inscription : Octobre 2014
    Messages : 22
    Points : 33
    Points
    33
    Par défaut
    Bonjour,

    Ici Vous pouvez trouver un function que va a transformer un text RTF en un plain text

    http://sagex3dev.mcmatica.com/2014/1...to-plain-text/

    Matteo

  3. #3
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2017
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 30
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2017
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Lien mort
    Bonjour Matica,

    Votre lien ne fonctionne pas.

    pouvez vous partager la solution différemment ?

    Merci,

  4. #4
    Membre averti
    Homme Profil pro
    Responsable d'un système d'information métier
    Inscrit en
    Janvier 2007
    Messages
    195
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Responsable d'un système d'information métier
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2007
    Messages : 195
    Points : 311
    Points
    311
    Par défaut
    bonjour,

    peut-être :

    https://matteo72.wordpress.com/2014/...to-plain-text/

    ou en cherchant sur Google : sage-x3-convert-rtf-to-plain-text

    le sujet est souvent abordé.

    cordialement,

  5. #5
    Membre éclairé Avatar de PrinceCorwin
    Homme Profil pro
    Responsable d'un système d'information métier
    Inscrit en
    Mars 2012
    Messages
    334
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Responsable d'un système d'information métier
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2012
    Messages : 334
    Points : 687
    Points
    687
    Par défaut
    Bonjour Tof@JoB,

    Je ne parviens pas à afficher la page en lien.
    Toutes les pages que j'ai pu visiter remonte sur l'adresse http://sagex3dev.mcmatica.com/2014/1...-to-plain-text et cette page est inatteignable.

    Les autres liens trouvés, propose une solution en SQL.

    Auriez-vous par le plus grand des hasards fait une copie du traitement L4G proposé ?

    Merci.
    Si ce message vous a aidé, appuyez sur le petit , ca fait toujours plaisir
    Merci.

  6. #6
    Nouveau membre du Club
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Mars 2013
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Vendée (Pays de la Loire)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2013
    Messages : 24
    Points : 31
    Points
    31
    Par défaut j'ai ca en stock ...
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
     
    #### funprog pour appeler .....
    Funprog F_RTF2TEXT(CLOB)
    Variable Clbfile CLOB
      Local Integer LENTXMT : LENTXMT = 250
      Local Integer NRIGHE : NRIGHE = 4 # 4 = 250x4 char
      Local Char XOUT(LENTXMT)(NRIGHE)
      Call S_RTF2TEXT(LENTXMT,CLOB,XOUT,NRIGHE)
      #Concatenate the row with plain text, by removing the empty space
      Local Char XRET(250) : Raz XRET
      For XI = 0 To NRIGHE
        XRET += vireblc(XOUT(XI),2)
      Next
    End XRET
     
    ###############################################################################
    #                            CORE PROCEDURES subprog convert clob RTF to txt                                 
    #
    # Author: Matteo Carminati (mcarminati@ma-tica.it)
    #
    # This program is free software; you can redistribute it and/or modify it    
    # under the terms version 3 of the GNU General Public License as published   
    # by the Free Software Foundation. This program is distributed in the hope   
    # that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
    # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           
    # See the GNU General Public License for more details.   
    #  
    ###############################################################################
    Subprog S_RTF2TEXT(PLENRIGAOUT,CLOB,PTXTOUT,PNRIGEOUT)
    Value Integer PLENRIGAOUT
    Variable Clbfile CLOB
    Variable Char PTXTOUT
    Variable Integer PNRIGEOUT
     
        Local Integer XRIGHE
        Local Integer XNOL
        Local Integer XNCH
        Local Char XCH(1)
        Local Char XCHPREV(1)
        Local Integer XSTRTAG1 : XSTRTAG1 = 0    
        Local Integer XSTRTAG2 : XSTRTAG2 = 0    
     
        Local Integer LENGHT : LENGHT = len(CLOB)
        Local Integer CLOTAI : CLOTAI = int(LENGHT/GCLOLNG)+1
     
        Local  Char    PRTFIN   (GCLOLNG)(CLOTAI)
     
        Setlob PRTFIN With CLOB
     
     
        XRIGHE = dim(PRTFIN,1)
     
        Local Char XOUT(250)(XRIGHE)
        Local Integer XOUTRLEN(XRIGHE)
        Local Char RIGA(250)
        Local Integer XESCAPE 
     
     
     
        #Toglie i tag RTF
     
        For XNOL = 0 To XRIGHE - 1
            Raz RIGA
            RIGA = PRTFIN(XNOL)
            XOUTRLEN(XNOL) = 0
            For XNCH = 1 To len(RIGA)
                XCHPREV = XCH            
     
                XCH = mid$(RIGA,XNCH,1) 
                If XCH = "\" Then
                    XESCAPE = -1
                    If func F_GETNEXTCHR(PRTFIN,1,XNCH,XNOL,XRIGHE)= "}" Then
                        XCHPREV = XCH
                        XNCH = XNCH + 1
                        XCH = "}"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,1,XNCH,XNOL,XRIGHE)= "{" Then
                        XCHPREV = XCH
                        XNCH = XNCH + 1
                        XCH = "{"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,4,XNCH,XNOL,XRIGHE)= "pard" Then
                        XNCH = XNCH + 4
                        XCH = " "
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,3,XNCH,XNOL,XRIGHE)= "par" Then
                        XNCH = XNCH + 3
                        XCH = " "
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,3,XNCH,XNOL,XRIGHE)= "'e0" Then
                        XNCH = XNCH + 3
                        XCH = "a"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,3,XNCH,XNOL,XRIGHE)= "'e9" Then
                        XNCH = XNCH + 3
                        XCH = "e"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,3,XNCH,XNOL,XRIGHE)= "'e8" Then
                        XNCH = XNCH + 3
                        XCH = "e"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,3,XNCH,XNOL,XRIGHE)= "'b0" Then
                        XNCH = XNCH + 3
                        XCH = "°"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,3,XNCH,XNOL,XRIGHE)= "'ec" Then
                        XNCH = XNCH + 3
                        XCH = "i"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,3,XNCH,XNOL,XRIGHE)= "'f2" Then
                        XNCH = XNCH + 3
                        XCH = "o"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,3,XNCH,XNOL,XRIGHE)= "'f9" Then
                        XNCH = XNCH + 3
                        XCH = "u"
                        XESCAPE = 1
                    Endif
                    If func F_GETNEXTCHR(PRTFIN,2,XNCH,XNOL,XRIGHE)= "fs" Then   #Font size
                        XNCH = XNCH + 2
                        XCH = ""
                        XESCAPE = -1
                    Endif
                    If XESCAPE = -1 Then
                            XSTRTAG1 = 1 
                            XNCH = XNCH + 1                         
                    Endif
     
                Endif
     
                If XCH = "{" and XCHPREV <> "\" Then XSTRTAG2 = XSTRTAG2 + 1 : Endif
     
                If XSTRTAG1 = 0 and XSTRTAG2 <= 1  Then
                    XOUT(XNOL) += XCH    
                    XOUTRLEN(XNOL) += 1
                Endif  
                If XCH = " " or find(func F_GETNEXTCHR(PRTFIN,2,XNCH-1,XNOL,XRIGHE) ,'\}','\{','\\') > 0 Then XSTRTAG1 = 0 : Endif
                If XCH = "}" and XCHPREV <> "\" Then XSTRTAG2 = XSTRTAG2 - 1 : Endif
            Next            
        Next
     
     
        Local Integer XNOL2
        Local Integer XCONTA2
     
        XNOL2 = 0
        XCONTA2 = PLENRIGAOUT
        For XNOL = 0 To XRIGHE - 1 
            Raz RIGA
            RIGA = XOUT(XNOL)
            If XNOL = XRIGHE : RIGA = vireblc(RIGA,1) : Endif
            If len(RIGA) > 0 Then
                For XNCH = 1 To len(RIGA)
                    XCH = mid$(RIGA,XNCH,1) 
                    If XCH = chr$(13) Then
                        XCH = " "
                        If func F_GETNEXTCHR(XOUT,1,XNCH,XNOL,XRIGHE)= chr$(10) Then                   
                            XNCH = XNCH + 1
                        Endif
                    Endif
                    If XCH = chr$(10) Then
                        XCH = " "
                        If func F_GETNEXTCHR(XOUT,1,XNCH,XNOL,XRIGHE)= chr$(13) Then                   
                            XNCH = XNCH + 1
                        Endif
                    Endif
                    If XNCH = 1 and XNOL = 0 and XCH = "{" Then XCH = "" : Endif
                    PNRIGEOUT = XNOL2 + 1
                    PTXTOUT(XNOL2) += XCH
                    XCONTA2 = XCONTA2 - 1
                    If XCONTA2 = 0 Then
                        XNOL2 = XNOL2 + 1
                        XCONTA2 = PLENRIGAOUT
                    Endif
                Next   
            Endif
        Next
     
        #tolgo la graffa finale 
        RIGA = vireblc(PTXTOUT(XNOL2),1)
        If mid$(RIGA,len(RIGA),1) = "}" Then
            PTXTOUT(XNOL2) =  mid$(RIGA,1,len(RIGA)-1)
        Endif
     
     
    End
     
    ############################
    Funprog F_GETNEXTCHR(PARRIN,NCHNEXT,NCURPOS,NCURNOL,NTOTRIGHE)
    Value Char PARRIN
    Value Integer NCHNEXT
    Value Integer NCURPOS
    Value Integer NCURNOL
    Value Integer NTOTRIGHE
     
        Local Char XRET(NCHNEXT) : XRET = ""
     
        Local Integer XNCH 
        Local Char RIGA(250)
        Local Integer XCONTA
     
        For XNOL = NCURNOL To NTOTRIGHE - 1
            RIGA = PARRIN(NCURNOL)
            For XNCH = NCURPOS + 1 To len(RIGA) - 1
                XRET += mid$(RIGA,XNCH,1)            
                XCONTA += 1
                If XCONTA = NCHNEXT Then
                    Break
                Endif
            Next
            If XCONTA = NCHNEXT Then
                Break
            Endif
            NCURPOS = 0
        Next   
    End XRET

  7. #7
    Membre éclairé Avatar de PrinceCorwin
    Homme Profil pro
    Responsable d'un système d'information métier
    Inscrit en
    Mars 2012
    Messages
    334
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Doubs (Franche Comté)

    Informations professionnelles :
    Activité : Responsable d'un système d'information métier
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2012
    Messages : 334
    Points : 687
    Points
    687
    Par défaut
    Bonjour à tous,

    Merci WipeOut85800 !
    Ca fonctionne très bien.

    dans un traitement.
    Reste à l'incorporer dans un écrans de consultation

    Encore un grand merci !
    Si ce message vous a aidé, appuyez sur le petit , ca fait toujours plaisir
    Merci.

  8. #8
    Futur Membre du Club
    Profil pro
    Inscrit en
    Novembre 2010
    Messages
    17
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2010
    Messages : 17
    Points : 9
    Points
    9
    Par défaut
    Citation Envoyé par JPRCOR Voir le message
    Bonjour,

    Nous souhaitons afficher le contenu d'un CLOB (Compte-rendu de réunionen texte formaté RTF) résultat d'une requête SQL sur le portail X3.

    Nous avons plusieurs problèmes:
    - Dans le requêteur graphique et dans le requêteur SQL, il n'est pas possible d'ajouter les champs CLOB en sortie de requête. Les champs CLOB sont "invisible" donc non sélectionnable. Pourquoi ? Y-a-t-il un moyen de les rendre visible et donc de les ajouter à la requête

    - Pour pallier à ce premier problème, nous avons "casté" le CLOB en chaine alphanumérique, c'est fonctionnel mais l'affichage contient tous le formatage RTF qui rend le texte illisible.

    D'où mes questions:
    - Y-a-t-il un moyen simple d'afficher les CLOBs sur le portail
    - Si non, peut-on utiliser une fonction X3 pour convertir du texte enrichie en texte brut ?

    Merci de votre réponse!

    vous pouvez me dire comment vous avez "casté" le CLOB ? dans une requête x3 ? en SQL ? help please ..

  9. #9
    Futur Membre du Club
    Profil pro
    Inscrit en
    Novembre 2010
    Messages
    17
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2010
    Messages : 17
    Points : 9
    Points
    9
    Par défaut
    c'est bon j'ia trouvé en sql VAR(xx) ...

  10. #10
    Nouveau Candidat au Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Mars 2022
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Landes (Aquitaine)

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Finance

    Informations forums :
    Inscription : Mars 2022
    Messages : 1
    Points : 1
    Points
    1
    Par défaut
    Bonjour à tous et merci pour cette discussion très utile , ,


    J'ai une demande concernant les champs CLOB ; c'est de les afficher dans un écran de consultation ,
    J'ai arrivé à utiliser le script partagé dans cette discussion , mais je n'arrive pas à l'utiliser dans un écran de consultation ? (Les blocs tableau n'acceptent pas le type des données CLOB)

    Y-a-t-il un moyen de gérer cette demande sans passer par les états ?

    Merci d'avance pour votre retour

    Bonne journée à tous

Discussions similaires

  1. Réponses: 3
    Dernier message: 08/03/2018, 00h30
  2. Réponses: 2
    Dernier message: 22/08/2017, 16h56
  3. Réponses: 3
    Dernier message: 27/03/2016, 19h46
  4. [HTML] affichage du contenu des balises 'alt' dans une iframe
    Par etarip dans le forum Balisage (X)HTML et validation W3C
    Réponses: 6
    Dernier message: 11/08/2005, 15h08
  5. affichage du contenu d'un fichier texte
    Par axel-erator dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 02/08/2005, 17h06

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo