none
aspx添加ReportViewer控件,数据源为xsd RRS feed

  • 问题

  • cs文档

    public partial class RoiReport : DialogBasePage { private DateTime beginTime; private DateTime endTime; private DataTable globalRoiDt; private int allMonth = 0; private double eachMonthSaveMoney = 0; private ReportService reportService = new ReportService(); /// <summary> /// 初始化界面 /// </summary> /// <param name="sender">s</param> /// <param name="e">e</param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CommomMethod.InitDate(BeginDateASPxDateEdit, EndDateASPxDateEdit); GetInputPara(); DataSet ds = new DataSet(); ds.ReadXmlSchema(Server.MapPath("RoiDs.xsd")); globalRoiDt = ds.Tables["GlobalRoiDt"]; InitReportData(true); } else { //隐藏word导出格式 ExcuteClientJS(string.Format("$('a[title={0}]').hide();", "Word")); ReportViewer1.WaitControlDisplayAfter = 50000; } } /// <summary> /// 初始化 /// </summary> /// <param name="isFirst">是否第一次打开</param> private void InitReportData(bool isFirst) { this.ReportViewer1.LocalReport.ReportPath = "Report\\GlobalRoiReport.rdlc"; InitGlobalParam(isFirst); //添加报表数据源 this.ReportViewer1.LocalReport.DataSources.Clear(); this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("GlobalRoiDt", globalRoiDt)); Random a = new Random(); this.ReportViewer1.LocalReport.DisplayName = "RoiReport" + DateTime.Now.ToString("yyyyMMddHHmmss") + a.Next(1, 100).ToString(); this.ReportViewer1.DataBind(); this.ReportViewer1.LocalReport.Refresh(); } /// <summary> /// 得到session中用户存入的条件 /// </summary> private void GetReportCondition() { beginTime = Convert.ToDateTime(Session["ReportBeginTime"]); endTime = Convert.ToDateTime(Session["ReportEndTime"]); } /// <summary> /// 获取数据 /// </summary> private void GetReport() { RoiCondition condtion = new RoiCondition(); condtion.AverageConfSiteNo = IisConfig.Instance().AverageConfSiteNo; condtion.AveragePersonSalary = IisConfig.Instance().AveragePersonSalary; condtion.AveragePersonTravelExpense = IisConfig.Instance().AveragePersonTravelExpense; condtion.AveragePersonTravelTime = IisConfig.Instance().AveragePersonTravelTime; condtion.AverageSitePersonNo = IisConfig.Instance().AverageSitePersonNo; condtion.IsHistoryCount = IisConfig.Instance().IsHistoryCount; condtion.SystemMoney = IisConfig.Instance().SysCost; condtion.MinTotalTime = IisConfig.Instance().MinCountConf; SmcErr smcErr = reportService.QueryRoiReport(beginTime, endTime, condtion, out eachMonthSaveMoney, out allMonth, out globalRoiDt); if (smcErr.IsSuccess()) { if (globalRoiDt != null && 0 != globalRoiDt.Rows.Count) { this.ReportViewer1.LocalReport.ReportPath = "Report\\GlobalRoiReport.rdlc"; InitGlobalParam(false); DataTable newGlobalRoiDt = ReportFormat.GetGlobalRoiDt(globalRoiDt); //添加报表数据源 this.ReportViewer1.LocalReport.DataSources.Clear(); this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("GlobalRoiDt", newGlobalRoiDt)); Random a = new Random(); this.ReportViewer1.LocalReport.DisplayName = "RoiReport" + DateTime.Now.ToString("yyyyMMddHHmmss") + a.Next(1, 100).ToString(); this.ReportViewer1.DataBind(); this.ReportViewer1.LocalReport.Refresh(); } else { ExcuteClientJS("InitDialog('PopupControl', 'NoReportData.aspx');"); InitReportData(true); } } else { string errorJs = WebUtility.DealSmcErr(smcErr, string.Empty, DialogCloseMode.Unclose); ExcuteClientJS(errorJs); } } /// <summary> /// 得到用户输入的参数,将其存入session /// </summary> private void GetInputPara() { List<DateTime> inputTimeList = CommomMethod.GetInputTime(BeginDateASPxDateEdit, EndDateASPxDateEdit); //得到开始时间字段 DateTime beginTime = inputTimeList[0]; Session["ReportBeginTime"] = beginTime; //得到会议结束时间字段 DateTime endTime = inputTimeList[1]; Session["ReportEndTime"] = endTime; } /// <summary> /// 初始化全局投资回报报表参数 /// </summary> private void InitGlobalParam(bool IsFirst) { ReportParameter Split = new ReportParameter("Split", Resource.SmcEnumResource.GetString("Colon_Label")); ReportParameter FontName = new ReportParameter("FontName", CommomMethod.GetUserFontOnReport()); ReportParameter ReportTitle = new ReportParameter("ReportTitle", Resource.SmcEnumResource.GetString("Report_Roi_GlobalReport_Title")); string name = Thread.CurrentThread.CurrentUICulture.DateTimeFormat.ShortDatePattern + " " + Thread.CurrentThread.CurrentUICulture.DateTimeFormat.LongTimePattern; ReportParameter ReportTime = new ReportParameter("ReportTime", Resource.SmcEnumResource.GetString("Report_Time_Label")); string beginTime = WebUtility.ConvertUTCToUserTime(Convert.ToDateTime(Session["ReportBeginTime"])).ToShortDateString(); string endTime = (WebUtility.ConvertUTCToUserTime(Convert.ToDateTime(Session["ReportEndTime"]).AddDays(-1))).ToShortDateString(); ReportParameter ReportBeginTime = new ReportParameter("ReportBeginTime", beginTime); ReportParameter ReportEndTime = new ReportParameter("ReportEndTime", endTime); ReportParameter ShowValue = new ReportParameter("ShowValue", IsFirst ? "0" : "1"); ReportParameter TimeFormat = new ReportParameter("TimeFormat", name); ReportParameter CurrentPage = new ReportParameter("CurrentPage", Resource.SmcEnumResource.GetString("Report_CurrentPage_Label")); ReportParameter TotalPage = new ReportParameter("TotalPage", Resource.SmcEnumResource.GetString("Report_TotalPage_Label")); ReportParameter AllMonth = new ReportParameter("AllMonth", Resource.SmcEnumResource.GetString("Report_Roi_AllMonth_Label") + allMonth.ToString()); ReportParameter TimeSpan = new ReportParameter("TimeSpan", string.Format(Resource.SmcEnumResource.GetString("Report_Roi_TimeSpan_Label"), beginTime, endTime)); ReportParameter EachMonthSaveMoney = new ReportParameter("EachMonthSaveMoney", Resource.SmcEnumResource.GetString("Report_Roi_EachMonthSaveMoney_Label") + eachMonthSaveMoney.ToString("0.00")); this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { Split, FontName, ReportTitle, ReportTime, ReportBeginTime, ReportEndTime, ShowValue, CurrentPage, TotalPage, AllMonth, TimeSpan, EachMonthSaveMoney }); } /// <summary> /// 显示报表按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void SearchReportASPxButton_Click(object sender, EventArgs e) { GetInputPara(); GetReportCondition(); GetReport(); } }

    aspx文档

    <rsweb:ReportViewer ID="ReportViewer1" LinkDisabledColor="#3366CC" LinkActiveHoverColor="#FF3300"
                                                LinkActiveColor="#3366CC" runat="server" Font-Names="Verdana" Font-Size="8pt"
                                                ShowBackButton="false" ShowZoomControl="false" ShowRefreshButton="false" ShowFindControls="False"
                                                BackColor="#999966" AsyncRendering="false" Width="750" Height="800" SizeToReportContent="true"
                                                PageCountMode="Actual" ShowWaitControlCancelLink="false">
                                            </rsweb:ReportViewer>

    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="RoiDs">
          <ConnectionProperties>
            <DataProvider>System.Data.DataSet</DataProvider>
            <ConnectString>/* Local Connection */</ConnectString>
          </ConnectionProperties>
          <rd:DataSourceID>12e91099-79fc-489a-9260-72c9fb20020b</rd:DataSourceID>
        </DataSource>
      </DataSources>
      <DataSets>
        <DataSet Name="GlobalRoiDt">
          <Fields>
            <Field Name="EstimateSaveMoney">
              <DataField>EstimateSaveMoney</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="SystemMoney">
              <DataField>SystemMoney</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="ActualSaveMoney">
              <DataField>ActualSaveMoney</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="IndexNo">
              <DataField>IndexNo</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>RoiDs</DataSourceName>
            <CommandText>/* Local Query */</CommandText>
          </Query>
          <rd:DataSetInfo>
            <rd:DataSetName>RoiDs</rd:DataSetName>
            <rd:SchemaPath>D:\SMC20R2Code\Sources\Web\Report\RoiDs.xsd</rd:SchemaPath>
            <rd:TableName>GlobalRoiDt</rd:TableName>
            <rd:TableAdapterFillMethod />
            <rd:TableAdapterGetDataMethod />
            <rd:TableAdapterName />
          </rd:DataSetInfo>
        </DataSet>
      </DataSets>
      <Body>
        <ReportItems>
          <Rectangle Name="rectangle1">
            <ReportItems>
              <Textbox Name="textbox1">
                <CanGrow>true</CanGrow>
                <KeepTogether>true</KeepTogether>
                <Paragraphs>
                  <Paragraph>
                    <TextRuns>
                      <TextRun>
                        <Value>=Parameters!ReportTitle.Value</Value>
                        <Style>
                          <FontFamily>=Parameters!FontName.Value</FontFamily>
                          <FontSize>20pt</FontSize>
                          <FontWeight>Bold</FontWeight>
                        </Style>
                      </TextRun>
                    </TextRuns>
                    <Style>
                      <TextAlign>Center</TextAlign>
                    </Style>
                  </Paragraph>
                </Paragraphs>
                <rd:DefaultName>textbox1</rd:DefaultName>
                <Top>0.25cm</Top>
                <Left>0.16354cm</Left>
                <Height>1.25cm</Height>
                <Width>18.58528cm</Width>
                <Style>
                  <PaddingLeft>2pt</PaddingLeft>
                  <PaddingRight>2pt</PaddingRight>
                  <PaddingTop>2pt</PaddingTop>
                  <PaddingBottom>2pt</PaddingBottom>
                </Style>
              </Textbox>
              <Textbox Name="Textbox18">
                <CanGrow>true</CanGrow>
                <KeepTogether>true</KeepTogether>
                <Paragraphs>
                  <Paragraph>
                    <TextRuns>
                      <TextRun>
                        <Value>=Parameters!TimeSpan.Value</Value>
                        <Style>
                          <FontFamily>=Parameters!FontName.Value</FontFamily>
                        </Style>
                      </TextRun>
                    </TextRuns>
                    <Style>
                      <TextAlign>Center</TextAlign>
                    </Style>
                  </Paragraph>
                </Paragraphs>
                <rd:DefaultName>Textbox16</rd:DefaultName>
                <Top>1.67639cm</Top>
                <Left>0.14992cm</Left>
                <Height>0.75cm</Height>
                <Width>9.24548cm</Width>
                <ZIndex>1</ZIndex>
                <Visibility>
                  <Hidden>=IIf(Parameters!ShowValue.Value.Equals("0"),True,False)</Hidden>
                </Visibility>
                <Style>
                  <Border>
                    <Style>None</Style>
                  </Border>
                  <PaddingLeft>2pt</PaddingLeft>
                  <PaddingRight>2pt</PaddingRight>
                  <PaddingTop>2pt</PaddingTop>
                  <PaddingBottom>2pt</PaddingBottom>
                </Style>
              </Textbox>
              <Textbox Name="Textbox17">
                <CanGrow>true</CanGrow>
                <KeepTogether>true</KeepTogether>
                <Paragraphs>
                  <Paragraph>
                    <TextRuns>
                      <TextRun>
                        <Value>=Parameters!AllMonth.Value</Value>
                        <Style>
                          <FontFamily>=Parameters!FontName.Value</FontFamily>
                        </Style>
                      </TextRun>
                    </TextRuns>
                    <Style>
                      <TextAlign>Center</TextAlign>
                    </Style>
                  </Paragraph>
                </Paragraphs>
                <rd:DefaultName>Textbox16</rd:DefaultName>
                <Top>2.5675cm</Top>
                <Left>0.14992cm</Left>
                <Height>0.75cm</Height>
                <Width>9.24548cm</Width>
                <ZIndex>2</ZIndex>
                <Visibility>
                  <Hidden>=IIf(Parameters!ShowValue.Value.Equals("0"),True,False)</Hidden>
                </Visibility>
                <Style>
                  <Border>
                    <Style>None</Style>
                  </Border>
                  <PaddingLeft>2pt</PaddingLeft>
                  <PaddingRight>2pt</PaddingRight>
                  <PaddingTop>2pt</PaddingTop>
                  <PaddingBottom>2pt</PaddingBottom>
                </Style>
              </Textbox>
              <Textbox Name="Textbox19">
                <CanGrow>true</CanGrow>
                <KeepTogether>true</KeepTogether>
                <Paragraphs>
                  <Paragraph>
                    <TextRuns>
                      <TextRun>
                        <Value>=Parameters!EachMonthSaveMoney.Value</Value>
                        <Style>
                          <FontFamily>=Parameters!FontName.Value</FontFamily>
                        </Style>
                      </TextRun>
                    </TextRuns>
                    <Style>
                      <TextAlign>Center</TextAlign>
                    </Style>
                  </Paragraph>
                </Paragraphs>
                <rd:DefaultName>Textbox16</rd:DefaultName>
                <Top>1.67639cm</Top>
                <Left>9.74146cm</Left>
                <Height>0.75cm</Height>
                <Width>9.00736cm</Width>
                <ZIndex>3</ZIndex>
                <Visibility>
                  <Hidden>=IIf(Parameters!ShowValue.Value.Equals("0"),True,False)</Hidden>
                </Visibility>
                <Style>
                  <Border>
                    <Style>None</Style>
                  </Border>
                  <PaddingLeft>2pt</PaddingLeft>
                  <PaddingRight>2pt</PaddingRight>
                  <PaddingTop>2pt</PaddingTop>
                  <PaddingBottom>2pt</PaddingBottom>
                </Style>
              </Textbox>
            </ReportItems>
            <DataElementOutput>ContentsOnly</DataElementOutput>
            <Top>0.23896cm</Top>
            <Left>0.34267cm</Left>
            <Height>3.50084cm</Height>
            <Width>18.91238cm</Width>
            <Style />
          </Rectangle>
          <Chart Name="Chart1">
            <ChartCategoryHierarchy>
              <ChartMembers>
                <ChartMember>
                  <Group Name="Chart1_CategoryGroup2">
                    <GroupExpressions>
                      <GroupExpression>=Fields!IndexNo.Value</GroupExpression>
                    </GroupExpressions>
                  </Group>
                  <Label>=Fields!IndexNo.Value</Label>
                </ChartMember>
              </ChartMembers>
            </ChartCategoryHierarchy>
            <ChartSeriesHierarchy>
              <ChartMembers>
                <ChartMember>
                  <Label>Estimate Save Money</Label>
                </ChartMember>
                <ChartMember>
                  <Label>System Money</Label>
                </ChartMember>
                <ChartMember>
                  <Label>Actual Save Money</Label>
                </ChartMember>
              </ChartMembers>
            </ChartSeriesHierarchy>
            <ChartData>
              <ChartSeriesCollection>
                <ChartSeries Name="EstimateSaveMoney">
                  <ChartDataPoints>
                    <ChartDataPoint>
                      <ChartDataPointValues>
                        <Y>=Fields!EstimateSaveMoney.Value</Y>
                      </ChartDataPointValues>
                      <ChartDataLabel>
                        <Style />
                      </ChartDataLabel>
                      <Style />
                      <ChartMarker>
                        <Style>
                          <Border>
                            <Color>LimeGreen</Color>
                          </Border>
                        </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>
                <ChartSeries Name="SystemMoney">
                  <ChartDataPoints>
                    <ChartDataPoint>
                      <ChartDataPointValues>
                        <Y>=Fields!SystemMoney.Value</Y>
                      </ChartDataPointValues>
                      <ChartDataLabel>
                        <Style />
                      </ChartDataLabel>
                      <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>
                <ChartSeries Name="ActualSaveMoney">
                  <ChartDataPoints>
                    <ChartDataPoint>
                      <ChartDataPointValues>
                        <Y>=Fields!ActualSaveMoney.Value</Y>
                      </ChartDataPointValues>
                      <ChartDataLabel>
                        <Style />
                      </ChartDataLabel>
                      <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 />
                      <Style>
                        <FontFamily>=Parameters!FontName.Value</FontFamily>
                        <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>
                  </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>
                  </ChartAxis>
                </ChartCategoryAxes>
                <ChartValueAxes>
                  <ChartAxis Name="Primary">
                    <Style>
                      <FontSize>8pt</FontSize>
                    </Style>
                    <ChartAxisTitle>
                      <Caption />
                      <Style>
                        <FontFamily>=Parameters!FontName.Value</FontFamily>
                        <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>
                  </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>
                  </ChartAxis>
                </ChartValueAxes>
                <Style>
                  <BackgroundGradientType>None</BackgroundGradientType>
                </Style>
              </ChartArea>
            </ChartAreas>
            <ChartLegends>
              <ChartLegend Name="ChartLegend1">
                <Style>
                  <BackgroundGradientType>None</BackgroundGradientType>
                  <FontSize>8pt</FontSize>
                </Style>
                <Position>BottomCenter</Position>
                <ChartLegendTitle>
                  <Caption />
                  <Style>
                    <FontSize>8pt</FontSize>
                    <FontWeight>Bold</FontWeight>
                    <TextAlign>Center</TextAlign>
                  </Style>
                </ChartLegendTitle>
                <HeaderSeparatorColor>Black</HeaderSeparatorColor>
                <ColumnSeparatorColor>Black</ColumnSeparatorColor>
              </ChartLegend>
            </ChartLegends>
            <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>GlobalRoiDt</DataSetName>
            <Top>4.14549cm</Top>
            <Left>0.46778cm</Left>
            <Height>10.42396cm</Height>
            <Width>18.62371cm</Width>
            <ZIndex>1</ZIndex>
            <DataElementOutput>Output</DataElementOutput>
            <Style>
              <Border>
                <Color>LightGrey</Color>
                <Style>None</Style>
              </Border>
              <BackgroundColor>White</BackgroundColor>
              <BackgroundGradientType>None</BackgroundGradientType>
            </Style>
          </Chart>
        </ReportItems>
        <Height>5.85925in</Height>
        <Style />
      </Body>
      <ReportParameters>
        <ReportParameter Name="ReportTitle">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="FontName">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="ReportTime">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="Split">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="ReportBeginTime">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="ReportEndTime">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="CurrentPage">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="TotalPage">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="ShowValue">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="TimeSpan">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="AllMonth">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
        <ReportParameter Name="EachMonthSaveMoney">
          <DataType>String</DataType>
          <Prompt>ReportParameter1</Prompt>
        </ReportParameter>
      </ReportParameters>
      <Width>19.59691cm</Width>
      <Page>
        <PageFooter>
          <Height>0.87312cm</Height>
          <PrintOnFirstPage>true</PrintOnFirstPage>
          <PrintOnLastPage>true</PrintOnLastPage>
          <ReportItems>
            <Textbox Name="Textbox6">
              <CanGrow>true</CanGrow>
              <KeepTogether>true</KeepTogether>
              <Paragraphs>
                <Paragraph>
                  <TextRuns>
                    <TextRun>
                      <Value>=Parameters!CurrentPage.Value &amp; ":" &amp; Globals.PageNumber &amp; " , " &amp; Parameters!TotalPage.Value &amp; ":" &amp; Globals.TotalPages</Value>
                      <Style />
                    </TextRun>
                  </TextRuns>
                  <Style>
                    <TextAlign>Right</TextAlign>
                  </Style>
                </Paragraph>
              </Paragraphs>
              <rd:DefaultName>Textbox6</rd:DefaultName>
              <Top>0.07042cm</Top>
              <Left>10.88887cm</Left>
              <Height>0.6cm</Height>
              <Width>8.36617cm</Width>
              <Visibility>
                <Hidden>=IIf(Parameters!ShowValue.Value.Equals("0"),True,False)</Hidden>
              </Visibility>
              <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>
        <PageHeight>29.7cm</PageHeight>
        <PageWidth>21cm</PageWidth>
        <LeftMargin>0.5cm</LeftMargin>
        <RightMargin>0.5cm</RightMargin>
        <TopMargin>2cm</TopMargin>
        <BottomMargin>2cm</BottomMargin>
        <ColumnSpacing>0.13cm</ColumnSpacing>
        <Style />
      </Page>
      <rd:ReportID>8adc7aff-add0-48b1-9661-c79b082fbe90</rd:ReportID>
      <rd:ReportUnitType>Cm</rd:ReportUnitType>
    </Report>

    xsd文档

    想要实现:

    1、当无数据时显示为:

    2、有数据时就显示图形报表数据

    求指教,我不知道哪里错了,我还有其余6个OK,就这一个出问题:无任何显示,怎么都显示不出来,急!!!!


    证明自己存在

    • 已移动 Mike Feng 2012年7月30日 2:41 asp.net (发件人:.NET Framework 一般性问题讨论区)
    2012年7月26日 12:46

答案

  • 你好,

    可以Debug看看是服务端的问题还是客户端的问题。看一下浏览器的source code 看看对应的HTML 有没有解析出来。如果HTML有了,但是没有显示出来,看一下CSS的问题。如果你用Chrome或者Firebug在Firefox中,按F12可以进行调试。

    2012年7月31日 8:07
    版主

全部回复