locked
.RDL Expression RRS feed

  • Question

  • User-888621621 posted

    Hi Programmers,

     

    I have an RDL expresion which returns yesterdays date :

    <Value>=CDate(DateAdd("d", -1, Now.Date)).ToString("dd/M/yyyy")</Value>

    But I want to combine it with a string like this but the below expression thorws an error any ideas?

          <Textbox Name="textbox50">
            <rd:DefaultName>textbox50</rd:DefaultName>
            <Width>12.69841cm</Width>
            <Style>
              <Color>SteelBlue</Color>
              <FontFamily>Tahoma</FontFamily>
              <FontSize>12pt</FontSize>
              <FontWeight>500</FontWeight>
              <PaddingLeft>2pt</PaddingLeft>
              <PaddingRight>2pt</PaddingRight>
              <PaddingTop>2pt</PaddingTop>
              <PaddingBottom>2pt</PaddingBottom>
            </Style>
            <ZIndex>1</ZIndex>
            <CanGrow>true</CanGrow>
            <Height>0.91429cm</Height>
            <Value>="Ancillary Receipt Report" & CDate(DateAdd("d", -1, Now.Date)).ToString("dd/M/yyyy").</Value>
          </Textbox>

    Thanks In Advance

     

    Thursday, September 26, 2013 7:52 AM

Answers

  • User-1360095595 posted

    I tested a quick report using: ="Ancillary Receipt Report" & DateAdd("d", -1, Now.Date).ToString("dd/M/yyyy")

    It worked just fine. I doubt your error is related to this line. I'd google/bing that error message you're getting.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 26, 2013 8:16 AM

All replies

  • User-1360095595 posted

    And the error is?

    Thursday, September 26, 2013 7:55 AM
  • User-888621621 posted
    The report definition is not valid. Details: An error occurred while parsing EntityName. Line 66, position 29. (rsInvalidReportDefinition)
    Thursday, September 26, 2013 7:57 AM
  • User-1360095595 posted

    I tested a quick report using: ="Ancillary Receipt Report" & DateAdd("d", -1, Now.Date).ToString("dd/M/yyyy")

    It worked just fine. I doubt your error is related to this line. I'd google/bing that error message you're getting.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 26, 2013 8:16 AM
  • User77042963 posted

     

    You need to concatenate the period in the expression.

    <Value>="Ancillary Receipt Report" & CDate(DateAdd("d", -1, Now.Date)).ToString("dd/M/yyyy")&"."</Value>

    Thursday, September 26, 2013 10:15 AM