How to work in Crystal Report with Object Data Source?
Asked Answered
B

2

0

How to work in Winforms Crystal Report with Object Data Source?

So far I have found web-links to use Crystal Report with DataSets or Databases directly.

Can anyone show me how to do it like this?

Bracer answered 13/11, 2010 at 4:49 Comment(0)
T
0

its the same as before...

reportDocument.SetDataSource(List1);
Thigpen answered 13/11, 2010 at 4:51 Comment(0)
S
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>
Straight answered 15/12, 2010 at 23:56 Comment(1)
I was talking about WinForms Applications.Bracer

© 2022 - 2024 — McMap. All rights reserved.