none
Microsoft.ReportViewer.WinForms version and subreports RRS feed

  • Question

  • I have a local (RDLC) report, which refers to a (local) subreport via property ReportName="ReportTest.NameSubReport.rdlc".

    When I create a VB project with a ReportViewer, using these reports, in VS2012, everything works. Creating an exact same project in 2010 produced a loading error on RefreshReport() line, which refered to inability of finding a report named "/ReportTest.NameSubReport.rdlc" (notice the slash in the beginning!).

    VS2010 uses Microsoft.ReportViewer.WinForms version 10.0.0.0, VS2012 - version 11.0.0.0. Replacing version 10 with version 11 in VS2010 solved the problem. But I presume that version 11 comes with VS2012, so those unlucky developers who haven't yet installed VS2012 won't be able to compile a project, which refers to Microsoft.ReportViewer.WinForms version 11.

    So, questions:

    1. Is there a way to "remove" the slash from the subreport name in VS2010 library? File system shouldn't be involved, as the location of the project differs among developers; so only resource-based solutions suit me.
    2. If not, can VS2012 DLL be distributed with VS2010 project for developers and, more important, for customers?

    Mikhail

    • Moved by Mike Feng Tuesday, March 26, 2013 7:59 AM
    Monday, March 25, 2013 1:52 PM

Answers

  • I was unable to replicate the issue I used both v10 and v11 and the report rendered correctly in both cases.  I had to make a few changes to get the code to compile. 

    1. By default the reports were added as embedded resources so I switched them to content.
    2. I had to modify the RV1 properties to specify the report path rather than using the embedded resource.
    3. In MainReport.rdlc it was referencing the embedded resource name so I had to change it to use the report name (without the .rdlc).

    Once all that was done the report renders using either version of RV.

    Michael Taylor - 3/26/2013
    http://msmvps.com/blogs/p3net

    • Marked as answer by MikNik Wednesday, April 3, 2013 8:47 AM
    Tuesday, March 26, 2013 2:49 PM

All replies

  • 1) I'm not aware of any issues like this and I use subreports without any problems.  I don't use RV itself but I have reports call subreports and I don't recall any slashes appearing.  I've upgraded from VS2010 to VS2012.

    2) The RV assemblies are part of the framework so they are already installed if the user has the framework.  Are you targeting .NET v4?

    Michael Taylor - 3/25/2013
    http://msmvps.com/blogs/p3net

    Monday, March 25, 2013 2:24 PM
  • Yes, I'm targeting .NET v4. So Microsoft.ReportViewer.WinForms version 11 is part of the framework? Otherwise it resides in the C:/Program Files (x86)/Microsoft Visual Studio/... directory.

    The problem with the subreports appears on VS2010, not on VS2012.


    Mikhail

    Monday, March 25, 2013 4:18 PM
  • RV has been a part of the framework for a while so you don't need to install VS to get it.  You can target whichever version of the RV that works for you and it is a redist so you can install it as part of your app if needed (http://msdn.microsoft.com/en-us/library/ms251723.aspx).  Like I said I've never heard of someone having this kind of problem so I'm not willing to say there isn't a problem with your code.  If you had a really simple demo project that would be useful to help diagnose whether this is a bug or not.  Of course if using v11 solves the problem then it isn't relevant because you can just use v11 in both VS2010 and VS2012.

    Michael Taylor - 3/25/2013
    http://msmvps.com/blogs/p3net

     
    Monday, March 25, 2013 5:06 PM
  • Then why VS2010 uses version 10 and not 11?

    I'll post the project tomorrow - can I add it as Zip archive, or do I need to copy all the various files here as text?


    Mikhail

    Monday, March 25, 2013 5:12 PM
  • I might have misspoken earlier given the direction this thread has gone.  I misunderstand where you were having the problem.  The RV controls are not part of the GACced framework.  They are installed as part of VS and can be GACced on any machine by running the installer I linked to earlier.  Alternatively several MS setup programs already include it as well including SQL Server.

    The history of RV is a little confusing to me but I believe it was originally part of SQL Server.  Somewhere around .NET V2 it got moved into its own redist.  It ships as part of VS2010+ to save devs the effort of having to install it separately.  I could have some of the details wrong but this is how I basically remember the flow.  RV is still partially tied to the version of Report Builder that is used for SSRS so it is indirectly tied to the version of SQL.  VS2010 was built to support SQL Server 2008 R2 which was still using the older reporting infrastructure.  Hence it targeted 10.0.  VS2012 was built to support SQL Server 2012 so it targets the newer version.  In general either version of the RV assembly should work just fine although there are some features that won't work without SQL 2012.  RV 10.0 is a .NET v2 assembly whereas RV 11.0 is a v4 assembly.  You can use RV 10.0 in any .NET 2.0+ app.  RV 11.0 will only work with a .NET v4+ app.

    You cannot attach files in the forums.  You can just post the relevant code for how you've set up the RV.

    Monday, March 25, 2013 5:45 PM
  • Ok, let's post some code.

    This is a WinForms project with a single form, containing just a ReportViewer object called "ReportViewer1", which LocalReport.ReportEmbeddedResource property is set to "ReportTest.MainReport.rdlc" (took me a while to figure out the exact syntax of this value).

    MyReportData.vb

    Public Class MyReportData
    
    	Public Property Group As String
    	
    	Public Property Name As String
    	
    	Public Property Vote As Integer
    	
    
    	''' <summary>
    	''' Convenience constructor.
    	''' </summary>
    	Public Sub New(group As String, name As String, vote As Integer)
    		Me.Group = group
    		Me.Name = name
    		Me.Vote = vote
    	End Sub
    
    End Class
    

    ReportTestForm.vb

    Imports Microsoft.Reporting.WinForms
    Imports System.IO
    Imports System.Reflection
    
    
    Public Class ReportTestForm
    
    	Private m_Data As New List(Of MyReportData) From {
    		New MyReportData("GroupA", "Deleg A1", 1),
    		New MyReportData("GroupA", "Deleg A2", 3),
    		New MyReportData("GroupA", "Deleg A3", 2),
    		New MyReportData("GroupA", "Deleg A4", 1),
    		New MyReportData("GroupB", "Deleg B1", 1),
    		New MyReportData("GroupB", "Deleg B2", 3)
    	}
    
    
    	Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    		AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf SubreportProcessHandler
    
    		ReportViewer1.LocalReport.SetParameters(new ReportParameter("NofVotes", "3"))
    		ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("ReportDataSet", m_Data))
    		ReportViewer1.RefreshReport()
    	End Sub
    
    
    	Private Sub SubreportProcessHandler(sender As Object, args As SubreportProcessingEventArgs)
    		args.DataSources.Add(New ReportDataSource("ReportDataSet", m_Data))
    	End Sub
    
    End Class
    

    MainReport.rdlc

    <?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="ReportTest">
          <ConnectionProperties>
            <DataProvider>System.Data.DataSet</DataProvider>
            <ConnectString>/* Local Connection */</ConnectString>
          </ConnectionProperties>
          <rd:DataSourceID>b63e68a8-b234-4de3-ac2d-693f4e6e3def</rd:DataSourceID>
        </DataSource>
      </DataSources>
      <DataSets>
        <DataSet Name="ReportDataSet">
          <Fields>
            <Field Name="Group">
              <DataField>Group</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="Name">
              <DataField>Name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="Vote">
              <DataField>Vote</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>ReportTest</DataSourceName>
            <CommandText>/* Local Query */</CommandText>
          </Query>
          <rd:DataSetInfo>
            <rd:DataSetName>ReportTest</rd:DataSetName>
            <rd:TableName>MyReportData</rd:TableName>
            <rd:ObjectDataSourceType>ReportTest.MyReportData, ReportTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
          </rd:DataSetInfo>
        </DataSet>
      </DataSets>
      <Body>
        <ReportItems>
          <Tablix Name="Tablix1">
            <TablixBody>
              <TablixColumns>
                <TablixColumn>
                  <Width>6.98425in</Width>
                </TablixColumn>
              </TablixColumns>
              <TablixRows>
                <TablixRow>
                  <Height>0.23622in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Group">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!Group.Value</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Group</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <BackgroundColor>#8bd4ff</BackgroundColor>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.23622in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Subreport Name="Subreport1">
                          <ReportName>ReportTest.NameSubReport.rdlc</ReportName>
                          <Parameters>
                            <Parameter Name="NofVotes">
                              <Value>=Parameters!NofVotes.Value</Value>
                            </Parameter>
                            <Parameter Name="GroupFilter">
                              <Value>=Fields!Group.Value</Value>
                            </Parameter>
                          </Parameters>
                          <Style>
                            <Border>
                              <Style>None</Style>
                            </Border>
                          </Style>
                        </Subreport>
                        <rd:Selected>true</rd:Selected>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
              </TablixRows>
            </TablixBody>
            <TablixColumnHierarchy>
              <TablixMembers>
                <TablixMember />
              </TablixMembers>
            </TablixColumnHierarchy>
            <TablixRowHierarchy>
              <TablixMembers>
                <TablixMember>
                  <Group Name="Details">
                    <PageBreak>
                      <BreakLocation>Start</BreakLocation>
                    </PageBreak>
                  </Group>
                  <TablixMembers>
                    <TablixMember />
                    <TablixMember />
                  </TablixMembers>
                </TablixMember>
              </TablixMembers>
            </TablixRowHierarchy>
            <DataSetName>ReportDataSet</DataSetName>
            <SortExpressions>
              <SortExpression>
                <Value>=Fields!Group.Value</Value>
              </SortExpression>
            </SortExpressions>
            <Top>2.05521cm</Top>
            <Height>1.2cm</Height>
            <Width>17.74cm</Width>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
            </Style>
          </Tablix>
          <Subreport Name="Subreport2">
            <ReportName>ReportTest.NameSubReport.rdlc</ReportName>
            <Parameters>
              <Parameter Name="NofVotes">
                <Value>=Parameters!NofVotes.Value</Value>
              </Parameter>
              <Parameter Name="GroupFilter">
                <Value>=""</Value>
              </Parameter>
            </Parameters>
            <Top>1.04951cm</Top>
            <Height>0.6cm</Height>
            <Width>17.74cm</Width>
            <ZIndex>1</ZIndex>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
            </Style>
          </Subreport>
          <Textbox Name="Textbox1">
            <CanGrow>true</CanGrow>
            <KeepTogether>true</KeepTogether>
            <Paragraphs>
              <Paragraph>
                <TextRuns>
                  <TextRun>
                    <Value>Group report</Value>
                    <Style>
                      <FontSize>14pt</FontSize>
                      <FontWeight>Bold</FontWeight>
                    </Style>
                  </TextRun>
                </TextRuns>
                <Style />
              </Paragraph>
            </Paragraphs>
            <rd:DefaultName>Textbox1</rd:DefaultName>
            <Height>0.73229cm</Height>
            <Width>17.74cm</Width>
            <ZIndex>2</ZIndex>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
              <PaddingLeft>2pt</PaddingLeft>
              <PaddingRight>2pt</PaddingRight>
              <PaddingTop>2pt</PaddingTop>
              <PaddingBottom>2pt</PaddingBottom>
            </Style>
          </Textbox>
        </ReportItems>
        <Height>2.27789in</Height>
        <Style />
      </Body>
      <ReportParameters>
        <ReportParameter Name="NofVotes">
          <DataType>Integer</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
      </ReportParameters>
      <Width>6.98425in</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>95278cc2-6b5c-4266-96d8-a1fb08d4062f</rd:ReportID>
      <rd:ReportUnitType>Cm</rd:ReportUnitType>
    </Report>

    NameSubReport.rdlc

    <?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="ReportTest">
          <ConnectionProperties>
            <DataProvider>System.Data.DataSet</DataProvider>
            <ConnectString>/* Local Connection */</ConnectString>
          </ConnectionProperties>
          <rd:DataSourceID>0f99a74b-87e3-4900-b9ec-9b43856b3b5f</rd:DataSourceID>
        </DataSource>
      </DataSources>
      <DataSets>
        <DataSet Name="ReportDataSet">
          <Fields>
            <Field Name="Group">
              <DataField>Group</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="Name">
              <DataField>Name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="Vote">
              <DataField>Vote</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>ReportTest</DataSourceName>
            <CommandText>/* Local Query */</CommandText>
          </Query>
          <rd:DataSetInfo>
            <rd:DataSetName>ReportTest</rd:DataSetName>
            <rd:TableName>MyReportData</rd:TableName>
            <rd:ObjectDataSourceType>ReportTest.MyReportData, ReportTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
          </rd:DataSetInfo>
        </DataSet>
      </DataSets>
      <Body>
        <ReportItems>
          <Tablix Name="Tablix1">
            <TablixBody>
              <TablixColumns>
                <TablixColumn>
                  <Width>2.10417in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.69792in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.7655in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.77592in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>0.828in</Width>
                </TablixColumn>
              </TablixColumns>
              <TablixRows>
                <TablixRow>
                  <Height>0.23622in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox1">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Name</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox1</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <BackgroundColor>LightGrey</BackgroundColor>
                            <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>Vote1</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Center</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox3</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <BackgroundColor>LightGrey</BackgroundColor>
                            <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>Vote2</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Center</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox7</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <BackgroundColor>LightGrey</BackgroundColor>
                            <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>Vote3</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Center</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox9</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <BackgroundColor>LightGrey</BackgroundColor>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox11">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Vote 4</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Center</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox11</rd:DefaultName>
                          <Style>
                            <Border>
                              <Color>LightGrey</Color>
                              <Style>Solid</Style>
                            </Border>
                            <BackgroundColor>LightGrey</BackgroundColor>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.23622in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Name">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!Name.Value</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Name</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="Vote">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=If(Fields!Vote.Value = 1, "X", "")</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Center</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Vote</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>=If(Fields!Vote.Value = 2, "X", "")</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Center</TextAlign>
                              </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>=If(Fields!Vote.Value = 3, "X", "")</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Center</TextAlign>
                              </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="Textbox12">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=If(Fields!Vote.Value = 4, "X", "")</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Center</TextAlign>
                              </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>
                  </TablixCells>
                </TablixRow>
              </TablixRows>
            </TablixBody>
            <TablixColumnHierarchy>
              <TablixMembers>
                <TablixMember />
                <TablixMember />
                <TablixMember>
                  <Visibility>
                    <Hidden>=Parameters!NofVotes.Value &lt; 2</Hidden>
                  </Visibility>
                </TablixMember>
                <TablixMember>
                  <Visibility>
                    <Hidden>=Parameters!NofVotes.Value &lt; 3</Hidden>
                  </Visibility>
                </TablixMember>
                <TablixMember>
                  <Visibility>
                    <Hidden>=Parameters!NofVotes.Value &gt; 3</Hidden>
                  </Visibility>
                </TablixMember>
              </TablixMembers>
            </TablixColumnHierarchy>
            <TablixRowHierarchy>
              <TablixMembers>
                <TablixMember>
                  <KeepWithGroup>After</KeepWithGroup>
                </TablixMember>
                <TablixMember>
                  <Group Name="Details" />
                </TablixMember>
              </TablixMembers>
            </TablixRowHierarchy>
            <DataSetName>ReportDataSet</DataSetName>
            <Height>1.2cm</Height>
            <Width>13.13564cm</Width>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
            </Style>
          </Tablix>
        </ReportItems>
        <Height>0.47244in</Height>
        <Style />
      </Body>
      <ReportParameters>
        <ReportParameter Name="GroupFilter">
          <DataType>String</DataType>
          <AllowBlank>true</AllowBlank>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="NofVotes">
          <DataType>Integer</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
      </ReportParameters>
      <Width>6.5in</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>675904d3-f1da-43f2-ae2c-3239ec2decb3</rd:ReportID>
      <rd:ReportUnitType>Cm</rd:ReportUnitType>
    </Report>

    I repeat: version 10 (default) produces a line with a slash, version 11 works fine.


    Mikhail

    Tuesday, March 26, 2013 6:10 AM
  • Hi Mikhail,

    I moved this thread to report forum for more responses.

    Thank you for your understanding and support.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, March 26, 2013 7:59 AM
  • I was unable to replicate the issue I used both v10 and v11 and the report rendered correctly in both cases.  I had to make a few changes to get the code to compile. 

    1. By default the reports were added as embedded resources so I switched them to content.
    2. I had to modify the RV1 properties to specify the report path rather than using the embedded resource.
    3. In MainReport.rdlc it was referencing the embedded resource name so I had to change it to use the report name (without the .rdlc).

    Once all that was done the report renders using either version of RV.

    Michael Taylor - 3/26/2013
    http://msmvps.com/blogs/p3net

    • Marked as answer by MikNik Wednesday, April 3, 2013 8:47 AM
    Tuesday, March 26, 2013 2:49 PM
  • What was wrong with the embedded resources?

    Mikhail

    Tuesday, March 26, 2013 4:41 PM
  • 1) It refused to find it.  This is commonly a problem with embedded resources because an embedded resource is fully qualified with the default namespace of the project when it is added to the project.  If the namespace ever changes the resource won't be found anymore.

    2) I never use embedded resources for reports because it makes it impossible to update a report without rebuilding the app. 

    The embedded resource isn't relevant though.  I fixed it up to use an embedded resource and it is working correctly.

    Michael Taylor
    http://msmvps.com/blogs/p3net

    Tuesday, March 26, 2013 5:05 PM