Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Thread: Crystal reports with media objects

  1. #11
    Member
    Join Date
    Dec 2000
    Location
    Australia
    Posts
    584

    Re: Crystal reports with media objects

    Media Object Text is encoded as RTF (Rich Text Format). You will need to strip out the RTF tags. If you search the web for "RTF strip" or "RTF stripper" you will find a number of C/C++ code examples. I have used these in the past to implement an RTF-stripping business function. If you need to achieve this in PL/SQL then you will probably have to implement one yourself. I did a quick search for RTF Strip PL/SQL and found a fews discussions but no actual PL/SQL code.
    Justin Miller

  2. #12
    Senior Member DSauve's Avatar
    Join Date
    Nov 2000
    Location
    Spokane, WA
    Posts
    1,248

    Re: Crystal reports with media objects

    jccoop,

    In your Crystal Report definition, for the media object field, click on Field Properties, and go into the Paragraph tab. Under Text Interpretation, select "RTF Text" and see if that makes it appear more readable. Good luck!
    Don Sauve
    Wagstaff, Inc.
    E1 9.2, Win2016, SQL Server 2016, TR 9.2.2.6, WebLogic 12.2.1, BI Publisher

  3. #13
    Senior Member Larry_Jones's Avatar
    Join Date
    Nov 2000
    Location
    Spokane, WA, USA
    Posts
    3,240

    Re: Crystal reports with media objects

    What Don said.

    Not only will it be more readable, it will appear exactly as entered/displayed on JDE screens, with all formatting, font sizing, bullets, etc, unlike UBEs which have all formatting information stripped out.

    All you have to do is tell Crystal that its RTF ...
    Larry Jones
    E1 9.2 - TR 9.2.2.6 on Win 2016 R2. SQL Server 2016
    Wintel, BI Publisher

  4. #14

    Re: Crystal reports with media objects

    the jdeDirect ODBC drivers now expose media objects and the Text objects, see http://www.unitysolutions.com/jdedirect/odbce1mo.html

    Manoj

  5. #15
    Member Jose Ayram's Avatar
    Join Date
    Nov 2006
    Location
    Caracas, Venezuela
    Posts
    39

    Re: Crystal reports with media objects

    Grettings,

    Great Solution, The Script work's

    Thank You Larry Jones
    Regards,
    José D Ayrám Q
    Developer & Consultant

    Working With:
    JD Edwards EnterpriseOne. Ver. 8.11, SP 1
    Tools Release 8.97.1.2
    Windows 2003 Server
    Oracle Application Server (OAS)
    DB Oracle 10g

    "The Human Knowledge Belongs To The World"

  6. #16
    New Member
    Join Date
    Jun 2003
    Posts
    48

    Re: Crystal reports with media objects

    [ QUOTE ]
    If you are on a Oracle Database - then there is another step I did in creating our database view of the F00165 Table.

    The view looks like this:

    ------------------------------------------------------
    connect PRODDTA/XXXXXX@XXXXXX;
    CREATE OR REPLACE VIEW f00165_view(
    NameObject_GDOBNM ,
    GenericTextKey_GDTXKY ,
    SeqNo_GDMOSEQN ,
    MediaObjType_GDGTMOTYPE ,
    LanguagePreference_GDLNGP ,
    UpdatedByUser_GDUSER ,
    DateUpdated_GDUPMJ ,
    TimeOfDay_GDTDAY ,
    ObjectTypeName_GDGTITNM ,
    QueueName_GDQUNAM ,
    FileName_GDGTFILENM ,
    MediaObjectVariableLeng_GDTXVC)
    AS SELECT
    GDOBNM,
    GDTXKY,
    GDMOSEQN,
    GDGTMOTYPE,
    GDLNGP,
    GDUSER,
    JDE2Date(GDUPMJ),
    GDTDAY,
    GDGTITNM,
    GDQUNAM,
    GDGTFILENM,
    JDETextFix(ROWID)
    FROM F00165
    WHERE GDGTMOTYPE = 0
    WITH READ ONLY;
    ---------------------------------------------------------------------

    Note that there are 2 Oracle Function Calls in this select.
    The first one, JDE2DATE, just converts the JDE Julian Date to a standard date.
    The second, JDETextFix(ROWID), does data type conversion on the BLOB data field. Here's the function I wrote to do this:
    ---------------------------------------------------------------------
    CREATE OR REPLACE FUNCTION "PRODDTA"."JDETEXTFIX" (p_rowid in
    ROWID) RETURN VARCHAR2
    IS
    v_textout VARCHAR2(4000);
    v_lob BLOB;
    v_buffer RAW(8192);
    v_offset INTEGER := 1;
    v_textlen BINARY_INTEGER := 8192;
    v_rawlen NUMBER;
    v_from_set RAW(2);
    v_to_set RAW(1);
    v_output RAW(8192);
    BEGIN
    SELECT gdtxft INTO v_lob
    FROM F00165 where ROWID = p_rowid;
    DBMS_LOB.READ (v_lob, v_textlen, v_offset,v_buffer);
    v_textout := ' ';
    v_from_set := HEXTORAW('7D00');
    v_to_set := HEXTORAW('7D');
    v_output := UTL_RAW.TRANSLATE (v_buffer, v_from_set, v_to_set);
    v_rawlen := UTL_RAW.LENGTH (v_output);
    if (v_rawlen > 4000) then
    v_rawlen := 4000;
    end if;
    if (v_rawlen > 0) then
    v_textout := UTL_RAW.CAST_TO_VARCHAR2 (UTL_RAW.SUBSTR(v_output,1,v_rawlen));
    end if;
    RETURN (v_textout);
    EXCEPTION WHEN NO_DATA_FOUND THEN
    RETURN (v_textout);
    END;
    ---------------------------------------------------------------------------
    Under Crystal 10 and 11 I don't believe the extra steps to remove the leading double-byte character (HEX(00)) is neccessary. But the conversion to the VARCHAR2 data type still is. There's probably a better way to do this now but this function was written 5 years ago and still works so . . .

    [/ QUOTE ]

    You sir are a steely eyed missle man. This function & view were the [censored], just what I needed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company and, or Oracle.