The language property follows ISO standard language abbreviations. You can
(United Kingdom)" or "English (United States)" are not. You should actually
string constant "English (United Kingdom)". If you use an expression, you
would see a processing warning which however is visible e.g. on the SOAP
API, but not e.g. through HTML Viewer.
"nice" language names rather than the abbreviations. But if you look at the
generated RDL, you will see the abbreviations. Just try en-GB in the report,
This posting is provided "AS IS" with no warranties, and confers no rights.
"karl prosser" <klumsy@gmail.com> wrote in message
news:86cbef10.0502282010.77a5206f@posting.google.com...
> in one of my projects i was dynamically setting the Language property
> of tables, textboxes etc , but it just wasn't working.. For my needs i
> solved the problem by rather setting dynamic Formats however i still
> thing this is a bug..
>
> it is shown in the example below..
> i have textboxes where each are set to
>
> =code.mydate which just returns a datetime
>
> the first textbox has language set to default (which is english (US)
> so the date
> gets shown in MM/DD/YYYY format
> the next one is set to English (United Kingdom) so it correctly
> shows it as DD/MM/YYYY
> however when i set it to English (United Kingdom) via a function or
> even just an expression ="English (United Kingdom)" it doesn't work..
> the language property only works when it is static, not dynamic.
>
> Karl
>
> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="
http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition" > xmlns:rd="
http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> > <RightMargin>1in</RightMargin>
> <Body>
> <ReportItems>
> <Textbox Name="textbox4">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <Format>d</Format>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <Language>="English (United Kingdom)"</Language>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>3</ZIndex>
> <Top>0.875in</Top>
> <Height>0.25in</Height>
> <Width>1.75in</Width>
> <CanGrow>true</CanGrow>
> <Value>=code.mydate</Value>
> <Left>0.25in</Left>
> </Textbox>
> <Textbox Name="textbox3">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <Format>d</Format>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <Language>=code.languagefunc</Language>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>2</ZIndex>
> <Top>1.25in</Top>
> <rd:DefaultName>textbox3</rd:DefaultName>
> <Height>0.25in</Height>
> <Width>1.75in</Width>
> <CanGrow>true</CanGrow>
> <Value>=code.mydate</Value>
> <Left>0.25in</Left>
> </Textbox>
> <Textbox Name="textbox2">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <Format>d</Format>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <Language>en-GB</Language>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>1</ZIndex>
> <Top>0.5in</Top>
> <rd:DefaultName>textbox2</rd:DefaultName>
> <Height>0.25in</Height>
> <Width>1.75in</Width>
> <CanGrow>true</CanGrow>
> <Value>=code.mydate</Value>
> <Left>0.25in</Left>
> </Textbox>
> <Textbox Name="textbox1">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <Format>d</Format>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <Top>0.125in</Top>
> <rd:DefaultName>textbox1</rd:DefaultName>
> <Height>0.25in</Height>
> <Width>1.75in</Width>
> <CanGrow>true</CanGrow>
> <Value>=code.mydate</Value>
> <Left>0.25in</Left>
> </Textbox>
> </ReportItems>
> <Style />
> <Height>2.875in</Height>
> </Body>
> <TopMargin>1in</TopMargin>
> <Code>Public Function mydate as DateTime
> return CDATE("2005-5-30")
> End Function
>
> Public Function languagefunc as string
> return "English (United Kingdom)"
> End Function</Code>
> <Width>6.5in</Width>
> <LeftMargin>1in</LeftMargin>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <rd:DrawGrid>true</rd:DrawGrid>
> <Description />
> <rd:ReportID>b3046005-89ba-47b1-aa40-b446a2205b39</rd:ReportID>
> <BottomMargin>1in</BottomMargin>
> <Language>en-US</Language>
> </Report>