none
Does the new ReportViewer control not support nested objects? RRS feed

  • Question

  • I am trying to upgrade my reports using VS 2010 beta 2 but I am running into a lot of troubles. A proper upgrade guide should have been very helpful. 

    My problem now is that the new report control does not seem to support nested objects!?? I have a table in a report bound to a dataset "DataSetDeal". My Deal object contains a BuyTrade and a SellTrade of type Trade which looks like:

     public class Trade
        {
            public int Id { get; set; }
            public decimal Volume { get; set; }
            public int Type { get; set; }
            public decimal Price { get; set; }
            public DateTime Date { get; set; }
            public int OrderbookId { get; set; }
            public decimal StopLossPrice { get; set; }
            public string Comment { get; set; }
            public decimal TotalTradeAmount { get; set; }
            public decimal CourtageAmount { get; set; }
        }

    In VS 2008 I could show those values in my report with = Fields!BuyTrade.Value.Price. Now the table cell just shows #Error:(

     

     

      

    Saturday, March 13, 2010 9:31 AM

All replies

  • Can you fill us in on how the report was created? Did you add it to your ReportViewer project from a VS2008 RDLc file? Have you tried creating a new report using this dataset?

    __________________________________________________________________
    William Vaughn
    Mentor, Consultant, Trainer, MVP
    http://betav.com
    http://betav.com/blog/billva
    http://www.hitchhikerguides.net

    “Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)”

    Please click the Mark as Answer button if a post solves your problem!

    Saturday, March 13, 2010 10:11 AM
    Moderator
  • Hi William, many thanks for your quick reply!

    I am not sure what you mean but I recreated the reportViewer and the reports (.rdlc) files in VS2010. I have a main report BaseReport.rdlc which contains a subreport BaseSubReport.rdlc. It is my subreport which has the "DataSetDeal" where I need to access the nested object Trade. When I try to do this with Fields!BuyTrade.Value.Price which works in my VS2008 project I just get #Error. Here is what BaseSubReport.rdcl looks like if it can be to any help:

    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">
      <DataSources>
        <DataSource Name="AutoTraderModulesTradingUtil">
          <ConnectionProperties>
            <DataProvider>System.Data.DataSet</DataProvider>
            <ConnectString>/* Local Connection */</ConnectString>
          </ConnectionProperties>
          <rd:DataSourceID>c4fdb354-d875-4816-835e-3222e0e1fef7</rd:DataSourceID>
        </DataSource>
      </DataSources>
      <DataSets>
        <DataSet Name="DataSetDeal">
          <Fields>
            <Field Name="BuyTrade">
              <DataField>BuyTrade</DataField>
              <rd:TypeName>AutoTrader.Modules.Trading.Util.Trade</rd:TypeName>
            </Field>
            <Field Name="CurrentCapital">
              <DataField>CurrentCapital</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="Expectancy">
              <DataField>Expectancy</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="InitialRisk">
              <DataField>InitialRisk</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="Result">
              <DataField>Result</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="ResultInPercent">
              <DataField>ResultInPercent</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="SellTrade">
              <DataField>SellTrade</DataField>
              <rd:TypeName>AutoTrader.Modules.Trading.Util.Trade</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>AutoTraderModulesTradingUtil</DataSourceName>
            <CommandText>/* Local Query */</CommandText>
          </Query>
          <rd:DataSetInfo>
            <rd:DataSetName>AutoTrader.Modules.Trading.Util</rd:DataSetName>
            <rd:TableName>DayResult</rd:TableName>
            <rd:ObjectDataSourceSelectMethod>TodaysDeals</rd:ObjectDataSourceSelectMethod>
            <rd:ObjectDataSourceType>AutoTrader.Modules.Trading.Util.DayResult, AutoTrader.Modules.Trading, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
          </rd:DataSetInfo>
        </DataSet>
      </DataSets>
      <Body>
        <ReportItems>
          <Tablix Name="Tablix2">
            <TablixBody>
              <TablixColumns>
                <TablixColumn>
                  <Width>0.703in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.54675in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.703in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.56759in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.69259in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.98425in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.98425in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.98425in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.98425in</Width>
                </TablixColumn>
              </TablixColumns>
              <TablixRows>
                <TablixRow>
                  <Height>0.19976in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox11">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Datum</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox11</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox5">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Pris</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox5</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox7">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Courtage</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox7</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox9">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Totalt</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox9</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox1">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>SL</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox1</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox3">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox3</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox12">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox12</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox14">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox14</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox16">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox16</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.19976in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Result">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!BuyTrade.Value.Date</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <Format>HH:mm:ss</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Result</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox6">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!BuyTrade.Value.Price</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox6</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox8">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!BuyTrade.Value.CourtageAmount</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox8</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox10">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!BuyTrade.Value.TotalTradeAmount</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox10</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox2">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!BuyTrade.Value.StopLossPrice</Value>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox2</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox4">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox4</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox13">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox13</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox15">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox15</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox17">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox17</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
              </TablixRows>
            </TablixBody>
            <TablixColumnHierarchy>
              <TablixMembers>
                <TablixMember />
                <TablixMember />
                <TablixMember />
                <TablixMember />
                <TablixMember />
                <TablixMember />
                <TablixMember />
                <TablixMember />
                <TablixMember />
              </TablixMembers>
            </TablixColumnHierarchy>
            <TablixRowHierarchy>
              <TablixMembers>
                <TablixMember>
                  <KeepWithGroup>After</KeepWithGroup>
                </TablixMember>
                <TablixMember>
                  <Group Name="Details" />
                </TablixMember>
              </TablixMembers>
            </TablixRowHierarchy>
            <DataSetName>DataSetDeal</DataSetName>
            <Top>1.07633cm</Top>
            <Left>0.22966cm</Left>
            <Height>1.01479cm</Height>
            <Width>18.16084cm</Width>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
            </Style>
          </Tablix>
          <Textbox Name="Date">
            <CanGrow>true</CanGrow>
            <KeepTogether>true</KeepTogether>
            <Paragraphs>
              <Paragraph>
                <TextRuns>
                  <TextRun>
                    <Value>=Parameters!Date.Value</Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value> Startkapital: </Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value>=Parameters!StartCapital.Value</Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value> Slutkapital: </Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value>=Parameters!EndCapital.Value</Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value> Resultat: </Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value>=Parameters!Result.Value</Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value> (</Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value>=Parameters!ResultInPercent.Value</Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                  <TextRun>
                    <Value>)</Value>
                    <Style>
                      <FontSize>9pt</FontSize>
                      <Format>dddd' den 'd MMMM yyyy</Format>
                    </Style>
                  </TextRun>
                </TextRuns>
                <Style />
              </Paragraph>
            </Paragraphs>
            <rd:DefaultName>Date</rd:DefaultName>
            <Top>0.29994cm</Top>
            <Left>0.22966cm</Left>
            <Height>0.6cm</Height>
            <Width>20.28cm</Width>
            <ZIndex>1</ZIndex>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
              <PaddingLeft>2pt</PaddingLeft>
              <PaddingRight>2pt</PaddingRight>
              <PaddingTop>2pt</PaddingTop>
              <PaddingBottom>2pt</PaddingBottom>
            </Style>
          </Textbox>
        </ReportItems>
        <Height>2.01042in</Height>
        <Style />
      </Body>
      <ReportParameters>
        <ReportParameter Name="Date">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="Result">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="ResultInPercent">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="StartCapital">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="EndCapital">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
      </ReportParameters>
      <Width>9.38692in</Width>
      <Page>
        <PageHeight>29.7cm</PageHeight>
        <PageWidth>21cm</PageWidth>
        <LeftMargin>2cm</LeftMargin>
        <RightMargin>2cm</RightMargin>
        <TopMargin>2cm</TopMargin>
        <BottomMargin>2cm</BottomMargin>
        <ColumnSpacing>0.13cm</ColumnSpacing>
        <Style />
      </Page>
      <rd:ReportID>c85f04a3-41a4-4bc9-931e-af782acfd2e5</rd:ReportID>
      <rd:ReportUnitType>Cm</rd:ReportUnitType>
    </Report>

     

    Saturday, March 13, 2010 10:41 AM
  • I forgot. I tested to show Deals' flat properties in the report for example result and there was no problem. The numbers are in the dataset it is just that I cannot reach the nested object's properties. My Deal object looks like:

     public class Deal
        {
            public decimal Result { get; set; }
            public Trade BuyTrade { get; set; }
            public Trade SellTrade { get; set; }
            public decimal ResultInPercent { get; set; }
            public decimal CurrentCapital { get; set; }
            public decimal Expectancy { get; set; }
            public decimal InitialRisk { get; set; }
    
        }
    Thanks again.
    /Jenny.
    Saturday, March 13, 2010 10:47 AM
  • Hi Jenny,

    i have the same problem.

    The Report shows only #Error, when i try the VS2008 SP1 Syntax: =Fields!BuyTrade.Value.Price !?!

    Is this a bug or how can we fix that?

     

    Thanks,
    Manuel

    Monday, April 19, 2010 10:22 PM
  • I think there is a bug in Visual Studio 2010 with ReportViewer and nested objects.

    I think I´ll go back Visual Studio 2008 until it be solved, because I have a lot of reports using nested objects (I use LINQ).

    Thanks

    Miguel

     

    Wednesday, April 28, 2010 9:04 PM
  • I have posted a number of bugs in Connect on these issues based on tests in VS2010 RTM. No response yet.

    __________________________________________________________________
    William Vaughn
    Mentor, Consultant, Trainer, MVP
    http://betav.com
    http://betav.com/blog/billva
    http://www.hitchhikerguides.net

    “Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)”

    Please click the Mark as Answer button if a post solves your problem!

    Saturday, May 1, 2010 5:46 PM
    Moderator
  • Any updates yet? I am also trying to convert to 2010 from 2008 and my nested objects are all #Error.
    Friday, May 7, 2010 4:40 PM
  • The following Connect bug appears to be correspond with the issue reported above.

    https://connect.microsoft.com/VisualStudio/feedback/details/553592/accessing-nested-objects-in-data-source-of-local-report-does-not-function

    I suggest people Upvote the Connect bug if this is causing them problems.

    Saturday, May 8, 2010 2:24 AM
  • Yes, I opened the connect issue with MS.  They did get back to me saying they could reproduce it but that was the last I heard.  If you find this thread or are following this thread because of this bug go to the link in the previous post and vote the issue up.  Thanks.
    Mike Buonaccorsi
    Saturday, May 8, 2010 4:03 AM
  • I was having an issue similar to this today, however I am using NHibernate. For me, it turned out to be an issue with lazy loading. I needed to turn off lazy loading and then all of my nested object's properties worked fine. I'm guessing lazy loading doesn't happen while the report is loading?

    Anyways, not sure if this helps anyone but I thought I'd throw it out there anyway.

    Monday, June 7, 2010 1:23 PM
  • Schummbo - I'm having similar problems and also using NHibernate, could you explain what you did to get things working for you please
    Sunday, September 25, 2011 12:18 AM