Some fields stop working when adding rdlc file to new project RRS feed

  • Question

  • User1013750657 posted

    I have created a rdlc file one an empty project. This creation was done all with the design tools the rdlc report , the dataset and the datasource, no code behind. The rdlc file as lots of fields witch include : •normal text •datetime formatted string like this : =Format(First(Fields!DataSaida.Value, "Obra"),"dd-MM-yyyy HH:mm:ss") •images

    Now all this works perfect on this project.

    Now I copied the RDLC file to my live project ( just the file ) and I am loading it from code behind. I have setup the dataset with all the fields and I load the report with this definitions :  

    reportViewer.ProcessingMode = ProcessingMode.Local;
    reportViewer.LocalReport.ReportEmbeddedResource = @"ControloMaterial.Relatorios." + ReportName + ".rdlc";
    reportViewer.LocalReport.DisplayName = ReportName;
    reportViewer.LocalReport.EnableExternalImages = true;
    reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Obra", ReportData.Tables["Obra"]));
    reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Nota", ReportData.Tables["Nota"]));




    when I load this the reports works fine except for the picture and the datetime fields.

    the picture as a red cross in the top left corner ( html style) and the datetime fields display actual datetime format string from the formula ("dd-MM-yyyy HH:mm:ss").

    Note : this is all on the same computer.

    Note : when I debug I can see the dataset->datatable->imagefield with the byte[] array.

    any ideas?

    thks in advanced

    rgds rui

    Monday, March 25, 2013 1:18 PM

All replies

  • User1013750657 posted

    I managed to resolve the date field.

    I changed to expression to normal and i´m formating the date value in the datatable´s codebehind.


    Still havent figured out a way for the image.


    Tuesday, March 26, 2013 8:21 AM
  • User1013750657 posted

    Hi no one?


    maybe this will help, message that shows on the immediate window

    Warning: The Value expression used in image ‘Image2’ returned a data type that is not valid. (rsInvalidExpressionDataType)

    Warning: The value of the ImageData property for the image ‘Image2’ is “=First(Fields!TipoEquipamentoImagem.Value, "Obra")”, which is not a valid ImageData. (rsInvalidExternalImageProperty)



    Monday, April 8, 2013 1:43 PM