How to handle invalid images in "Image" report item?

I have a report that displays images in Image item (MIMEType image/jpeg) in the table. Images are stored in the database.
Some of the images are, however, not a valid jpeg files (not sure what they are but I saved them as files and they cannot be opened by any graphics editor). When report server tries to display such an image in the report whole report fails.
Similarly, web application that tries to display them on the web page throws an exception. In web application we can catch that exception and show static "IMAGE IS INVALID" bitmap instead.
Is there a way to handle/catch such errors in SSRS? The way it is now is not good because error message doesn't tell you anything specific about error.

Enabling SSRS Remote errors
http://technet.microsoft.com/en-us/library/aa337165.aspx
http://www.sharepointjohn.com/sql-reporting-services-2008-r2-enable-remote-errors/
Displaying custom error message
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/2b891541-836f-4d9d-89f3-d2340319f453/
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • How to handle interactive list in alv reports

    hi experts.
    how to handle interactive list in alv reports.
    regards.
    subhasis

    HI Subhasis,
    below is the sample code for handling an interactive ALV report, hope this helps you ..
    REPORT  ZTEST_ALV123.                           
    TYPE-POOLS:SLIS.
    DATA :   IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
              IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    DATA: BEGIN OF ITAB OCCURS 0,
           VBELN LIKE VBAK-VBELN,
           POSNR LIKE VBAP-POSNR,
           END OF ITAB.
    DATA: BEGIN OF ITAB1 OCCURS 0,
           VBELN LIKE LIKP-VBELN,
           POSNR LIKE LIPS-POSNR,
           VGBEL LIKE LIPS-VGBEL,
           VGPOS LIKE LIPS-VGPOS,
           END OF ITAB1.
    DATA: IT_LIPS LIKE ITAB1 OCCURS 0 WITH HEADER LINE.
    SELECT  VBELN
            POSNR
            FROM VBAP
            INTO TABLE ITAB.
    IF SY-SUBRC = 0.
      SORT ITAB BY VBELN .
      SELECT VBELN
       POSNR
       VGBEL
       VGPOS
       INTO TABLE ITAB1
       FROM LIPS
       FOR ALL ENTRIES IN ITAB
       WHERE VGBEL = ITAB-VBELN
         AND    VGPOS = ITAB-POSNR.
    ENDIF.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS  = 1.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS  = 1.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM       = SY-REPID
        I_CALLBACK_PF_STATUS_SET = 'PFSTATUS'
        I_CALLBACK_USER_COMMAND  = 'HANDLE_USER_COMMAND'
        IT_FIELDCAT              = IT_FIELDCAT
      TABLES
        T_OUTTAB                 = ITAB
      EXCEPTIONS
        PROGRAM_ERROR            = 1
        OTHERS                   = 2.
    IF SY-SUBRC  = 0.
    ENDIF.
    *&      Form  POPUP
          text
         -->P_EXTAB    text
    FORM POPUP USING P_EXTAB TYPE SLIS_T_EXTAB.
    "here double click on PFSTATUS and create the status, "activate, before that set PICK for choose(F2).
    *- Pf status
      SET PF-STATUS 'PFSTATUS'.
    ENDFORM.                 " POPUP
    *&      Form  HANDLE_USER_COMMAND
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM HANDLE_USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                                   RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          IF RS_SELFIELD-FIELDNAME = 'VBELN'.
            READ TABLE ITAB INDEX RS_SELFIELD-TABINDEX.
            LOOP AT ITAB1 WHERE VGBEL = ITAB-VBELN
                              AND VGPOS = ITAB-POSNR.
              MOVE-CORRESPONDING ITAB1 TO IT_LIPS.
              APPEND IT_LIPS.
            ENDLOOP.
            PERFORM INTERACTIVE_REPORT.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "HANDLE_USER_COMMAND
    *&      Form  interactive_report
          text
    FORM INTERACTIVE_REPORT .
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-SELTEXT_L = 'VBELN'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 1.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-SELTEXT_L = 'ITEM'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 2.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'VGBEL'.
      X_FIELDCAT-SELTEXT_M = 'SO #'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 3.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'VGPOS'.
      X_FIELDCAT-SELTEXT_M = 'SO ITEM'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 4.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-REPID
          IT_FIELDCAT        = IT_FIELDCAT1
        TABLES
          T_OUTTAB           = IT_LIPS
        EXCEPTIONS
          PROGRAM_ERROR      = 1
          OTHERS             = 2.
      IF SY-SUBRC  = 0.
      ENDIF.
    ENDFORM.                    " interactive_report
    Regards,
    Ranjita
    null

  • How to handle varchar(4000) field in reporting?

    Hello,
    I am having a Oracle database, the data in tables of which is being stored from a web application. One of the fields of a table is having varchar(4000) datatype.
    The data in this field is text which may contain carriage returns also.
    I have to create report of this table. How to display this data properly in a report?
    I tried few things:
    Accessed the table using SQL Developer and pasted the query output in Excel.
    As the text contains carriage returns, it is being spread into one or more rows.
    How to handle this? What is the proper way to create report for such data?
    Please help.
    -Sameer

    You the following to remove the carriage returns
    SQL> select 'a'||chr(10)||'line2
    2
    SQL> select 'line 1'||chr(10)||'line 2' from dual ;
    'LINE1'||CHR(
    line 1
    line 2
    SQL> select replace('line 1'||chr(10)||'line 2',chr(10),'') from dual ;
    REPLACE('LIN
    line 1line 2
    If this is not the soln , can you paste some sample data

  • How to handle Invalid characters(Square Box) in BI

    Hi All,
    Daily I am  getting Invalid character(Square Box) issue with 0Material description and material manufacture part number when the it is being loaded to targets.
    This data is being loaded to many data targets and daily they are being failed .
    I have checked the text in MARA Table and found that there also the square box is appearing in the description.But when i copy the text and past it in word document in the place of box it is appearing as space/Tab.
    Can you please help me how to handle this type of issue in BI .
    Thanks in advance

    Hi Binbi1,
       This eror is due to carriage returns which turns into a square box when transferring data, this can not be corrected through the RSKC, this is solved through an ABAP routine in the transformation rules, use this code:
    DATA i_text type c length 60.
    i_text = SOURCE_FIELDS-/BIC/ZMBS_FT1. "this is your material description field
    REPLACE ALL OCCURRENCES OF '#'
              IN i_text WITH ' '.
    REPLACE ALL OCCURRENCES OF '□'
              IN i_text WITH ' '.
    RESULT = i_text.
    I hope this help you....

  • How to handle the situation to forward work item manually?

    Hi All,
    In my workflow -
    For agent determination I have some custom logic to determine agents. If custom logic donu2019t return any agents then the requirement is work item needs to send back to workflow initiator.
    My issue-
    When no agent determines
    1.Work item needs to send back to workflow initiator - and he should not able to Approve or Reject work item - He Can only forward work item to any other person manually (he determines to whom it should forward).
    2. After manually forwarding the work item it is normal process 2 level of approval from that point .
    Please let me know for the first item how to handle the situation?
    I have developed 2 section - one goes with regular agent determination -
    and the other one when no agent determines then I am assigning back to workflow initiator. Now I want to handle that - initiator should not accept or reject and he can only forward to someone. How to develop this?
    Please let me know your thoughts.
    Thanks in advance.
    Rajesh,

    Hi All,
    Thanks for the answers.. sorry for late replay.. requirement was not confirmed.
    1. As I described in my question
    After my custom conditions.. I have to send workitem back to initator ( Now initiator forwards the work item to someone else  ( need to restrict  users  based on role - )..
    While doing this process initiator should not have access to approve or reject he should only forward the workitem.
    After forwarding the work item -this person should have approve or reject options.
    My question is not answered..
    1. As Vijay told..
    Dont give Approve and Reject Options and in Description u specify like
    If I dont provide approve/reject when I am sending the work item to initiator - After initiator forwarding this work item - how do we the other approver will get options  Approve and Reject?
    2.  AS -surjith kumar
    If your Using the Rule or Expression you have to restrict via coding -  This will solve one of my problem -
    How I can restict  users with role based?
    My problem is not solved.. Initiator should not have access to approve but He should only forward the work item...
    Please let me know...

  • How to handle an event on images

    precisely i have an image of hand , when i click a finger i want display an image from database

    You must add a MouseListener to the component the image is displayed on. In the mouseClicked handler you use MouseEvent.getPoint and check if it is within the boundaries of a finger.

  • How to handle very wide EPS images?

    Hello,
    I am working on a project where we need to be able to open very wide EPS images in photoshop, but seems that the program has some limit. The image contains a printed music stave
    Please, see the attached eps file: I am able to open it with Preview (MacOS) despite it is truncated in some way, but I am completely unable to open it with Photoshop. Is there any other possible program to try if Photoshop fails?
    Any thoughts are very welcome.
    Thank you in advance!
    Best,
    Fabrizio

    Thank you guys and sorry for the automresponder, I really don't know how to avoid that!
    Anyway, as you can see all the files are truncaed. Any solution? It's interesting how the EPS file actually includes hte complete file but no program seems to be capable to display it entirely.
    Thank you again.
    Best,

  • How to Handle PF Status in ALV  report ?

    Hi friends i wanna handle my own PF Status in my report how can i handle it ?
    please help me?
    regards
    satish

    call function module reuse_alv_grid_display.
    exporting.
    programname = gd_repid.
    t_fieldcatalog = d_fieldcat.
    set pf_status = 'SET_PF_STATUS'.
    importing.
    t_outtab = itab.
    exceptions.
    form set_pf_status using rt_extab type slis_t_extab.
    SET PF_STATUS 'NEWSTATUS'.
    endform.
    double click on NEWSTATUS it will take u to new window where in u can select required icon's which u need to be displayed in output.
    otherwise
    please see the standard program bcalv_grid_05.
    Reward with points if helpful.

  • How to handle more column in a report?

    <p>Hai,</p><p> How do I handle to create a design which is have more than 10 column in a reports? Currently what I do is I used landscape and page size A3..but its still not enough space (column) that allows the reports to generate the data needs. Any advise?  <br /></p><p> </p>

    <p>hai..thanks for the response.</p><p>I&#39;ve chanes my reports using 11 X 17. Unfortunately,it seem different from the current reports. The page ruler at the top only display 17..which is mine is 25. (I used A3, landscape). Is it possible to get the page width something like 30 / 35.  Does I need to select a printer type to meet the requirement or something else? Kindly advise. </p>

  • How to handle Events in Blocked ALV report

    Hi All,
    I have a Blocked ALV report, I have a requirement where if I double click a row in blocked ALV report, it should branch off to MM01 transaction code and the material number and change number should get populated with the material number and change number  in my program.
    Is there any idea how to do this.
    Thanks,
    Vishal.

    hi anil,
    I have used user_command1 as the function module however the field details are not getting captured.
    How can we use set get parameters in this aspect.
    Please elaborate your answer.
    Thanks,
    Vishal.

  • How to handle UMLAUT characters in oracle reports 10g

    Hi All,
    we are facing issues while developing the report in 10g. There are few hardcoded values which have ä in it. We register these reports into Oracle Applications R12.  The report gets completed normal. But in the report output it displays as ö in (ungelöscht) or sometimes a1/2.
    Can anybody help in how to resolve this issue?
    Thanks
    Nikunj.

    please find the link i already ask this question
    [link]http://www.orafaq.com/forum/m/409062/135627/?srch=barcode#msg_409062[link]
    Hope its help you
    Regards
    Shahzaib ismail

  • How to handle invalid URLs in the requests

    Currently JSF ignores invalid characters in the request URLs like "|" or "<script>". These characters can be a security issue and can lead to "Cross site scripting" issue.
    I am trying to parse the request URLs and then redirect the user to the error page if the URL contains such invalid characters.
    Is there a better way of handling such characters in the URL?
    One way that i have thought of is to implement the PhaseListener and handle the URLs in the "Restore view" phase but the drawback in this
    implementation is that the controll will come to this listener during all the phases of the JSF life cycle. I just want the request to be handled only once and not during all the phases of JSF.

    Our application has too many customizations around the JSF framework and we have our own limitations extending the base "FacesServlet". It would be better if i can extend the listeners in the JSF framework.

  • How to handle Invalid characters in BI 7.0

    Hi ,
    Due to lower case letters in ODS ,DTP got failed ,we have replaced with Upper case letters in PSA,but how to load failed request from PSA to data target thru DTP as here we don't get option to reconstruct the failed request from PSA.we have deletd failed request from ODs and again done DTP but it is again failing .
    Thanks in Advance ,
    Rashmi

    Hi Rashmi,
    Create Error DTP, the all error records will be in error Stack and correct records will be update to data target.
    you can modify all bad records in error stack and upload to data target.
    you can create  Error DTP, at the present DTP, (2nd tab, Update).
    Regards
    Daya Sagar

  • Handle a non existance of report object while using find_report_object ?

    How to handle a non existance of report object while using find_report_object?
    HOW CAN I HANDLE THE ERROR FRM-41219 PROGRAMATICALLY.
    SINCE ID_NULL IS NOT SUPPORTING FOR REPORT OBJECT.
    1) Message level for FRM-41219 is 20, even if i set the message level to 20, it's not getting suppresed.
    As per my follwoing code, error is rasing once immidiatlly after the find_report_object.
    DECLARE
    REPID REPORT_OBJECT;
    BEGIN
    REPID := FIND_REPORT_OBJECT('REP_OBJECT');
    --NOTE 'REP_OBJECT' DOES NOT EXIST, IT'S NOT GOING TO THE EXCEPTION
    --SECTION AND RASING THE ERROR 41219 CANNOT FIND REPORT : INVALID ID.
    --QUESTION : HOW CAN I HANDLE THIS ERROR?
    EXCEPTION
    WHEN OTHERS THEN
    MESSAGE('INSIDE EXCEPTION');
    MESSAGE('INSIDE EXCEPTION');
    END;

    This is really more of a Forms issue since these are Forms built-ins. However, check out note 209513.1 in Metalink. It describes how to check if the report objects exists and how to trap the error.
    Hope that helps,
    Toby

  • How to insert a conditional image into a report

    Hi
    I am fairly new to HTML DB, but I have managed to create my first application.
    I need a little help with one report.
    One of the columns in the report contains Y, N or R. The customer wants me to display a different coloured image depending on the value (ie a red button for N, green for Y or amber for R).
    I have can add a static image to a report via "Column Formatting" -> "HTML Expression", but I have no idea how to make it conditional.
    Any ideas?
    Many thanks in advance.
    Rak

    Great, that works!!!!
    Thanks very much.
    For completeness (incase anyone else reads this), there was one typo, in your solution, you omitted the opening '<' in the image source HTML tag
    select loanno, itemid,
    decode (returned, 'N', '<img src="#IMAGE_PREFIX#bullet_red.gif" border="0" alt="Loaned">',
    'Y', '<img src="#IMAGE_PREFIX#bullet_green.gif" border="0" alt="In Library">',
    'R', '<img src="#IMAGE_PREFIX#bullet_orange.gif" border="0" alt="Returned">'
    ) as status
    from loans
    Thanks for your help,...
    Rak

Maybe you are looking for