2010-11-13 77 views

回答

0

它和以前一樣......

reportDocument.SetDataSource(List1);
0
 <CR:CrystalReportViewer ID="crvmyDataReport" runat="server" 
      ReportSourceID="crsmyData" EnableDatabaseLogonPrompt="False" DisplayGroupTree="False" 
      EnableParameterPrompt="False" ReuseParameterValuesOnRefresh="True" 
      BorderStyle="Solid" BorderColor="Black" BorderWidth="1px" /> 
     <br /> 
     <CR:CrystalReportSource ID="crsmyData" runat="server"> 
      <Report FileName="myData.rpt"> 
       <DataSources> 
        <CR:DataSourceRef DataSourceID="odsmyData" TableName="myData" /> 
       </DataSources> 
      </Report> 
     </CR:CrystalReportSource> 
     <asp:ObjectDataSource ID="odsmyData" runat="server" 
      OldValuesParameterFormatString="original_{0}" SelectMethod="myDataQuery" 
      TypeName="myDataAppTableAdapters.myDataTableAdapter"> 
      <SelectParameters> 
       <asp:ControlParameter ControlID="tb1" ConvertEmptyStringToNull="False" 
        DbType="String" Name="p1" PropertyName="Text" /> 
       <asp:ControlParameter ControlID="tb2" ConvertEmptyStringToNull="False" 
        DbType="String" Name="p2" PropertyName="Text" /> 
       <asp:ControlParameter ControlID="tb3" ConvertEmptyStringToNull="False" 
        DbType="String" Name="p3" PropertyName="Text" /> 
       <asp:ControlParameter ControlID="ddl1" ConvertEmptyStringToNull="False" 
        DbType="String" Name="p4" PropertyName="SelectedValue" /> 
      </SelectParameters> 
     </asp:ObjectDataSource> 
+2

我在談論的WinForms應用。 – anonymous 2010-12-16 09:39:28

相關問題