SSRS图表在报表生成器中不可见

时间:2015-10-07 18:51:18

标签: reporting-services charts reportbuilder3.0

我基于具有三列和八个记录的数据集创建了一个简单的报告。我试图在折线图上显示这些数据,但是当我在报表生成器中运行报表时,我得到的是一个灰色框,看起来可能是图表边框(请参见下面的屏幕截图)。我尝试使用不同的字段来表示该值,我尝试更改该值的聚合函数,并且我尝试更改图表类型,但我得到的只是灰色框。

我甚至没有得到空白图表或某种错误消息,这让我觉得它不是报告设计或配置问题,而是我错过了一些组件,但我不知道它会是什么。灰色框下方的表格来自同一个数据集,因此我知道它不是权限问题,我知道我收到了数据。

有没有人见过这个?

enter image description here

我没有在上面的图片中保存报告,我最初是使用插入图表向导创建的。这是一个新的报告,也是使用向导创建的,缩小到时间和值字段,它也只显示一个灰色框。

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
  <AutoRefresh>0</AutoRefresh>
  <DataSources>
    <DataSource Name="DataSource1">
      <ConnectionProperties>
        <DataProvider>SQL</DataProvider>
        <ConnectString>Data Source=TestDBServer;Initial Catalog=TestDB</ConnectString>
        <Prompt>Specify a user name and password for data source DataSource1:</Prompt>
      </ConnectionProperties>
      <rd:SecurityType>DataBase</rd:SecurityType>
      <rd:DataSourceID>574876d0-bf5a-4165-8c60-ecca513284fc</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="DataSet1">
      <Query>
        <DataSourceName>DataSource1</DataSourceName>
        <CommandText>SELECT
  AnaLog.[Time]
  ,AnaLog.[Value]
FROM
  AnaLog
WHERE
  AnaLog.Tag = N'well 6 gpm'
  AND AnaLog.[Time] &gt; N'10/01/2015 10:00:00'
  AND AnaLog.[Time] &lt; N'10/01/2015 12:00:00'</CommandText>
        <rd:DesignerState><QueryDefinition xmlns="http://schemas.microsoft.com/ReportingServices/QueryDefinition/Relational"><SelectedColumns><ColumnExpression ColumnOwner="AnaLog" ColumnName="Time" /><ColumnExpression ColumnOwner="AnaLog" ColumnName="Value" /></SelectedColumns><Filters><Filter Operator="="><ColumnExpression ColumnOwner="AnaLog" ColumnName="Tag" /><FilterValue>well 6 gpm</FilterValue></Filter><Filter Operator="&gt;"><ColumnExpression ColumnOwner="AnaLog" ColumnName="Time" /><FilterValue>10/01/2015 10:00:00</FilterValue></Filter><Filter Operator="&lt;"><ColumnExpression ColumnOwner="AnaLog" ColumnName="Time" /><FilterValue>10/01/2015 12:00:00</FilterValue></Filter></Filters></QueryDefinition></rd:DesignerState>
      </Query>
      <Fields>
        <Field Name="Time">
          <DataField>Time</DataField>
          <rd:TypeName>System.DateTime</rd:TypeName>
        </Field>
        <Field Name="Value">
          <DataField>Value</DataField>
          <rd:TypeName>System.Single</rd:TypeName>
        </Field>
      </Fields>
    </DataSet>
  </DataSets>
  <ReportSections>
    <ReportSection>
      <Body>
        <ReportItems>
          <Chart Name="Chart1">
            <ChartCategoryHierarchy>
              <ChartMembers>
                <ChartMember>
                  <Group Name="Chart1_CategoryGroup">
                    <GroupExpressions>
                      <GroupExpression>=Fields!Time.Value</GroupExpression>
                    </GroupExpressions>
                  </Group>
                  <SortExpressions>
                    <SortExpression>
                      <Value>=Fields!Time.Value</Value>
                    </SortExpression>
                  </SortExpressions>
                  <Label>=Fields!Time.Value</Label>
                </ChartMember>
              </ChartMembers>
            </ChartCategoryHierarchy>
            <ChartSeriesHierarchy>
              <ChartMembers>
                <ChartMember>
                  <Label>Value</Label>
                </ChartMember>
              </ChartMembers>
            </ChartSeriesHierarchy>
            <ChartData>
              <ChartSeriesCollection>
                <ChartSeries Name="Value">
                  <ChartDataPoints>
                    <ChartDataPoint>
                      <ChartDataPointValues>
                        <Y>=Max(Fields!Value.Value)</Y>
                      </ChartDataPointValues>
                      <ChartDataLabel>
                        <Style />
                      </ChartDataLabel>
                      <ToolTip>#VALY</ToolTip>
                      <Style />
                      <ChartMarker>
                        <Style />
                      </ChartMarker>
                      <DataElementOutput>Output</DataElementOutput>
                    </ChartDataPoint>
                  </ChartDataPoints>
                  <Type>Line</Type>
                  <Style />
                  <ChartEmptyPoints>
                    <Style />
                    <ChartMarker>
                      <Style />
                    </ChartMarker>
                    <ChartDataLabel>
                      <Style />
                    </ChartDataLabel>
                  </ChartEmptyPoints>
                  <ValueAxisName>Primary</ValueAxisName>
                  <CategoryAxisName>Primary</CategoryAxisName>
                  <ChartSmartLabel>
                    <CalloutLineColor>Black</CalloutLineColor>
                    <MinMovingDistance>0pt</MinMovingDistance>
                  </ChartSmartLabel>
                </ChartSeries>
              </ChartSeriesCollection>
            </ChartData>
            <ChartAreas>
              <ChartArea Name="Default">
                <ChartCategoryAxes>
                  <ChartAxis Name="Primary">
                    <Style>
                      <FontSize>8pt</FontSize>
                    </Style>
                    <ChartAxisTitle>
                      <Caption>Axis Title</Caption>
                      <Style>
                        <FontSize>8pt</FontSize>
                      </Style>
                    </ChartAxisTitle>
                    <ChartMajorGridLines>
                      <Enabled>False</Enabled>
                      <Style>
                        <Border>
                          <Color>Gainsboro</Color>
                        </Border>
                      </Style>
                    </ChartMajorGridLines>
                    <ChartMinorGridLines>
                      <Style>
                        <Border>
                          <Color>Gainsboro</Color>
                          <Style>Dotted</Style>
                        </Border>
                      </Style>
                    </ChartMinorGridLines>
                    <ChartMinorTickMarks>
                      <Length>0.5</Length>
                    </ChartMinorTickMarks>
                    <CrossAt>NaN</CrossAt>
                    <Minimum>NaN</Minimum>
                    <Maximum>NaN</Maximum>
                    <ChartAxisScaleBreak>
                      <Style />
                    </ChartAxisScaleBreak>
                  </ChartAxis>
                  <ChartAxis Name="Secondary">
                    <Style>
                      <FontSize>8pt</FontSize>
                    </Style>
                    <ChartAxisTitle>
                      <Caption>Axis Title</Caption>
                      <Style>
                        <FontSize>8pt</FontSize>
                      </Style>
                    </ChartAxisTitle>
                    <ChartMajorGridLines>
                      <Enabled>False</Enabled>
                      <Style>
                        <Border>
                          <Color>Gainsboro</Color>
                        </Border>
                      </Style>
                    </ChartMajorGridLines>
                    <ChartMinorGridLines>
                      <Style>
                        <Border>
                          <Color>Gainsboro</Color>
                          <Style>Dotted</Style>
                        </Border>
                      </Style>
                    </ChartMinorGridLines>
                    <ChartMinorTickMarks>
                      <Length>0.5</Length>
                    </ChartMinorTickMarks>
                    <CrossAt>NaN</CrossAt>
                    <Location>Opposite</Location>
                    <Minimum>NaN</Minimum>
                    <Maximum>NaN</Maximum>
                    <ChartAxisScaleBreak>
                      <Style />
                    </ChartAxisScaleBreak>
                  </ChartAxis>
                </ChartCategoryAxes>
                <ChartValueAxes>
                  <ChartAxis Name="Primary">
                    <Style>
                      <FontSize>8pt</FontSize>
                    </Style>
                    <ChartAxisTitle>
                      <Caption>Axis Title</Caption>
                      <Style>
                        <FontSize>8pt</FontSize>
                      </Style>
                    </ChartAxisTitle>
                    <ChartMajorGridLines>
                      <Style>
                        <Border>
                          <Color>Gainsboro</Color>
                        </Border>
                      </Style>
                    </ChartMajorGridLines>
                    <ChartMinorGridLines>
                      <Style>
                        <Border>
                          <Color>Gainsboro</Color>
                          <Style>Dotted</Style>
                        </Border>
                      </Style>
                    </ChartMinorGridLines>
                    <ChartMinorTickMarks>
                      <Length>0.5</Length>
                    </ChartMinorTickMarks>
                    <CrossAt>NaN</CrossAt>
                    <Minimum>NaN</Minimum>
                    <Maximum>NaN</Maximum>
                    <ChartAxisScaleBreak>
                      <Style />
                    </ChartAxisScaleBreak>
                  </ChartAxis>
                  <ChartAxis Name="Secondary">
                    <Style>
                      <FontSize>8pt</FontSize>
                    </Style>
                    <ChartAxisTitle>
                      <Caption>Axis Title</Caption>
                      <Style>
                        <FontSize>8pt</FontSize>
                      </Style>
                    </ChartAxisTitle>
                    <ChartMajorGridLines>
                      <Style>
                        <Border>
                          <Color>Gainsboro</Color>
                        </Border>
                      </Style>
                    </ChartMajorGridLines>
                    <ChartMinorGridLines>
                      <Style>
                        <Border>
                          <Color>Gainsboro</Color>
                          <Style>Dotted</Style>
                        </Border>
                      </Style>
                    </ChartMinorGridLines>
                    <ChartMinorTickMarks>
                      <Length>0.5</Length>
                    </ChartMinorTickMarks>
                    <CrossAt>NaN</CrossAt>
                    <Location>Opposite</Location>
                    <Minimum>NaN</Minimum>
                    <Maximum>NaN</Maximum>
                    <ChartAxisScaleBreak>
                      <Style />
                    </ChartAxisScaleBreak>
                  </ChartAxis>
                </ChartValueAxes>
                <Style>
                  <BackgroundGradientType>None</BackgroundGradientType>
                </Style>
              </ChartArea>
            </ChartAreas>
            <ChartLegends>
              <ChartLegend Name="Default">
                <Style>
                  <BackgroundGradientType>None</BackgroundGradientType>
                  <FontSize>8pt</FontSize>
                </Style>
                <ChartLegendTitle>
                  <Caption />
                  <Style>
                    <FontSize>8pt</FontSize>
                    <FontWeight>Bold</FontWeight>
                    <TextAlign>Center</TextAlign>
                  </Style>
                </ChartLegendTitle>
                <HeaderSeparatorColor>Black</HeaderSeparatorColor>
                <ColumnSeparatorColor>Black</ColumnSeparatorColor>
              </ChartLegend>
            </ChartLegends>
            <ChartTitles>
              <ChartTitle Name="Default">
                <Caption>Chart Title</Caption>
                <Style>
                  <BackgroundGradientType>None</BackgroundGradientType>
                  <FontWeight>Bold</FontWeight>
                  <TextAlign>General</TextAlign>
                  <VerticalAlign>Top</VerticalAlign>
                </Style>
              </ChartTitle>
            </ChartTitles>
            <Palette>BrightPastel</Palette>
            <ChartBorderSkin>
              <Style>
                <BackgroundColor>Gray</BackgroundColor>
                <BackgroundGradientType>None</BackgroundGradientType>
                <Color>White</Color>
              </Style>
            </ChartBorderSkin>
            <ChartNoDataMessage Name="NoDataMessage">
              <Caption>No Data Available</Caption>
              <Style>
                <BackgroundGradientType>None</BackgroundGradientType>
                <TextAlign>General</TextAlign>
                <VerticalAlign>Top</VerticalAlign>
              </Style>
            </ChartNoDataMessage>
            <DataSetName>DataSet1</DataSetName>
            <Top>0.4in</Top>
            <Height>2.10417in</Height>
            <Width>5.25in</Width>
            <Style>
              <Border>
                <Color>LightGrey</Color>
                <Style>Solid</Style>
              </Border>
              <BackgroundColor>White</BackgroundColor>
              <BackgroundGradientType>None</BackgroundGradientType>
            </Style>
          </Chart>
          <Textbox Name="ReportTitle">
            <CanGrow>true</CanGrow>
            <KeepTogether>true</KeepTogether>
            <Paragraphs>
              <Paragraph>
                <TextRuns>
                  <TextRun>
                    <Value />
                    <Style>
                      <FontFamily>Verdana</FontFamily>
                      <FontSize>20pt</FontSize>
                    </Style>
                  </TextRun>
                </TextRuns>
                <Style />
              </Paragraph>
            </Paragraphs>
            <rd:WatermarkTextbox>Title</rd:WatermarkTextbox>
            <rd:DefaultName>ReportTitle</rd:DefaultName>
            <Height>0.4in</Height>
            <Width>5.5in</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.53542in</Height>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
        </Style>
      </Body>
      <Width>10.04167in</Width>
      <Page>
        <PageFooter>
          <Height>0.45in</Height>
          <PrintOnFirstPage>true</PrintOnFirstPage>
          <PrintOnLastPage>true</PrintOnLastPage>
          <ReportItems>
            <Textbox Name="ExecutionTime">
              <CanGrow>true</CanGrow>
              <KeepTogether>true</KeepTogether>
              <Paragraphs>
                <Paragraph>
                  <TextRuns>
                    <TextRun>
                      <Value>=Globals!ExecutionTime</Value>
                      <Style />
                    </TextRun>
                  </TextRuns>
                  <Style>
                    <TextAlign>Right</TextAlign>
                  </Style>
                </Paragraph>
              </Paragraphs>
              <rd:DefaultName>ExecutionTime</rd:DefaultName>
              <Top>0.06944in</Top>
              <Left>4in</Left>
              <Height>0.25in</Height>
              <Width>2in</Width>
              <Style>
                <Border>
                  <Style>None</Style>
                </Border>
                <PaddingLeft>2pt</PaddingLeft>
                <PaddingRight>2pt</PaddingRight>
                <PaddingTop>2pt</PaddingTop>
                <PaddingBottom>2pt</PaddingBottom>
              </Style>
            </Textbox>
          </ReportItems>
          <Style>
            <Border>
              <Style>None</Style>
            </Border>
          </Style>
        </PageFooter>
        <LeftMargin>1in</LeftMargin>
        <RightMargin>1in</RightMargin>
        <TopMargin>1in</TopMargin>
        <BottomMargin>1in</BottomMargin>
        <Style />
      </Page>
    </ReportSection>
  </ReportSections>
  <rd:ReportUnitType>Inch</rd:ReportUnitType>
  <rd:ReportID>e60b76a9-7915-42bc-bdb7-d6ddcbebbbb6</rd:ReportID>
</Report

&GT;

1 个答案:

答案 0 :(得分:0)

如果有其他人遇到此问题,我卸载了报告服务并重新安装,之后它工作正常