Image Disappears when sorting in SSRS for server report on report viewer(on .aspx) page

  • Hi Everybody,

    I am generating rdl file dynamically using the code and also implementing the SORTING feature in RDL file. The RDL is created and published to the report server and then i get the same report and show it on the report viewer.

    The report is shown on the Report Viewer perfectly with all the features(sorting, image, data etc) shown up perfectly. Now when i sort the column the data sorting goes very well but the IMAGE which is shown up blows off and a CROSS mark is shown. But i get the image when i refresh the report viewer but the sorted data goes of.

    So How can i get the image shown when i sort the data and export to excel. Image is disappearing which i am not able to understand.

    This image is shown even on sorting in the report manager but when i bind it to the report viewer and sort, it disappears.

    The XML code for image file is

    Values is the one which is folder path in report server where image is stored.

    I tried this to set the image

    ----DID NOT WORK

    writer.WriteStartElement("Image");

    writer.WriteAttributeString("Name", null, "image1");

    writer.WriteElementString("Sizing", "Fit");

    writer.WriteElementString("MIMEType", "image/jpeg");

    writer.WriteElementString("Source", "External");

    writer.WriteElementString("ZIndex", "23");

    writer.WriteElementString("Top", "0.125in");

    writer.WriteElementString("Height", ".7in");

    writer.WriteElementString("Width", "1.5in");

    string imagePathForAdhoc = "http://localhost/MSCReports/Reports/MSCLogo.JPG";//Path in the Report Server

    writer.WriteElementString("Value", imagePathForAdhoc);

    writer.WriteElementString("Left", "0.125in");

    writer.WriteEndElement(); // Image

    --DID NOT WORK

    writer.WriteStartElement("Image");

    writer.WriteAttributeString("Name", null, "image1");

    writer.WriteElementString("Sizing", "Fit");

    writer.WriteElementString("MIMEType", "image/jpeg");

    writer.WriteElementString("Source", "External");

    writer.WriteElementString("ZIndex", "23");

    writer.WriteElementString("Top", "0.125in");

    writer.WriteElementString("Height", ".7in");

    writer.WriteElementString("Width", "1.5in");

    string imagePathForAdhoc = "/Online Services/Images/LOGO.JPG";//Path in the Report Server

    writer.WriteElementString("Value", imagePathForAdhoc);

    writer.WriteElementString("Left", "0.125in");

    writer.WriteEndElement(); // Image

    --DID NOT WORK

    writer.WriteStartElement("Image");

    writer.WriteAttributeString("Name", null, "image1");

    writer.WriteElementString("Sizing", "Fit");

    writer.WriteElementString("MIMEType", "image/jpeg");

    writer.WriteElementString("Source", "Embedded");

    writer.WriteElementString("ZIndex", "23");

    writer.WriteElementString("Top", "0.125in");

    writer.WriteElementString("Height", ".7in");

    writer.WriteElementString("Width", "1.5in");

    imagePathForAdhoc = Server.MapPath("~/MSCLogo.JPG");

    writer.WriteElementString("Value", imagePathForAdhoc);

    writer.WriteElementString("Left", "0.125in");

    writer.WriteEndElement(); // Image

    EXCEPTION I GET : System.Exception: CopyOfAdhocReporting.cs::SoapException - PublishReport(string reportName) ---> System.Web.Services.Protocols.SoapException: The value of the Value property for the image ‘image1’ is “C:\Reports\Oasis\Reports\MSC.Reports\Web\MSCLogo.JPG”, which is not a valid Value. ---> The value of the Value property for the image ‘image1’ is “C:\Reports\Oasis\Reports\MSC.Reports\Web\MSCLogo.JPG”, which is not a valid Value.

    --DID NOT WORK

    writer.WriteStartElement("Image");

    writer.WriteAttributeString("Name", null, "image1");

    writer.WriteElementString("Sizing", "Fit");

    writer.WriteElementString("MIMEType", "image/jpeg");

    writer.WriteElementString("Source", "Embedded");

    writer.WriteElementString("ZIndex", "23");

    writer.WriteElementString("Top", "0.125in");

    writer.WriteElementString("Height", ".7in");

    writer.WriteElementString("Width", "1.5in");

    //imagePathForAdhoc = Server.MapPath("~/MSCLogo.JPG");

    writer.WriteElementString("Value", imagePathForAdhoc);

    writer.WriteElementString("Left", "0.125in");

    writer.WriteEndElement(); // Image

    EXCEPTION I GET :System.Exception: CopyOfAdhocReporting.cs::BeginPublishReport(string ReportName)::Error occured. ---> System.Exception: CopyOfAdhocReporting.cs::SoapException - PublishReport(string reportName) ---> System.Web.Services.Protocols.SoapException: The value of the Value property for the image ‘image1’ is “/ONLINE SERVICES/ADHOC REPORTS/MSCLogo.JPG”, which is not a valid Value. ---> The value of the Value property for the image ‘image1’ is “/ONLINE SERVICES/ADHOC REPORTS/MSCLogo.JPG”, which is not a valid Value.

    Please let me know how we can add the Embedded Image in C#.net. I need this because i provide sorting feature. When i sort the image disappears and when i refresh the image is seen again. Sorting makes the image disappear(this is all when ITS and EXTERNAL IMAGE)

    I Cannot add EMBEDDED IMAGE IN C#.NET because in the XML CODE I SEE FOR AN IMAGE there is an extra tag as below, which i am unable to replicate in C#.NEt

    /9j/4AAQSkZJRgABAAEAGgAUAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/2wCEAAgGBgcGBQgHBwcKCQgKDRYODQwMDRsTFBAWIBwiIR8cHx4jKDMrIyYwJh4fLD0tMDU2OTo5Iis/Qz44QzM4OTcBCQoKDQsNGg4OGjckHyQ3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//+AB4CAAAAAgAAAAQAAABaAAAAAwAAAAQAAAAAAAAA/8QBogAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoLAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+hEAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/8AAEQgASwC3AwERAAIRAQMRAf/aAAwDAQACEQMRAD8A4yvPufT2HiNyMgUDGlSDy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xAI3VSIbd8E5IwWYduM4Hv2xXRCnY8vE4hS0izv/8AhGNA/wCgHp//AICp/hW1kcXtJ9w/4RjQP+gHp/8A4Cp/hRyoOeXcQeGNAx/yA9P/APAVP8KiyHzy7kcWiaVbP5kGmWkTptdWSFQQQevArNpFyk2ty+rMepNTKEW3oc92WYuY1J61rCEVayJbZJ3rYGRSdPxqJFUuoZ+Y/XH60uhXQeAMHigQ0AY6U2MEPT6kUIJCH/GhhHYUHr7HFT1AcvIBPXFVJiaSImhilDJJGrrnowz2rNlXa2IRp1lEytHZwI2eqxgGiKRSlLuWkP3foDW0TCXxWGuxCuR2GRSbNLIG+8R9KmY0M+zwSZZ4Y2OepUH2qbDu0ARIo8RoqDd0UAd8fyoDclH3h9atGbP/2Q==

    HOW TO SEND THE IMAGE DATA in C#.NET TO MAKE IT EMBEDDED which is all characters i dont know...

    Please let me know how to get from this. Any help on this would be greatly appreciated.

    Thanks,

    Suman

  • What version are you running. I thought that this was an issue in 2005 but then fixed in 2005 sp2.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply