Using business objects as data source for MS Report rdlcs with WAPs

Last post 06-17-2009 3:11 PM by svp. 3 replies.

Sort Posts:

  • Using business objects as data source for MS Report rdlcs with WAPs

    05-04-2006, 9:30 AM
    • Member
      35 point Member
    • GMan6
    • Member since 04-07-2006, 4:40 PM
    • Posts 7

    Since there is no App_Code directory, I am unable to get my generics class to appear in the datasources for an rdlc that I create in my WAP project. 

    I think there might be some limitation where we cannot use generics business objects as the datasource or reports since the WAP has no App_Code folder where the class must normally reside for the reporting datasources to pick it up as a datasource.

    Any thoughts?  This will prevent my company from moving to 2005!

  • Re: Using business objects as data source for MS Report rdlcs with WAPs

    05-05-2006, 10:03 AM
    • Participant
      1,171 point Participant
    • BradleyB
    • Member since 11-06-2002, 3:53 PM
    • Posts 227

    Here is what someone else used to work around the problem:

    1.  Drop an ObjectDataSource on the form with the ReportViewer.
    2. Configure the ODS to use the TableAdapter associated with the source DataSet.
    3. In the Misc->LocalReport properties for the ReportViewer, select DataSources and click the ellipsis.
    4. In the ReportDataSource Collection Editor, click the Add button.
    5. In the properties for the new ReportDataSource, specify <DataSet>_<table> as the value for the Name property and the ID of the ODS as the value for the DataSourceId property.

     This results in the following ObjectDataSource tag:

     <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="GetData" TypeName="ReportViewerCrash.DataSet1TableAdapters.databasesTableAdapter">
    </asp:ObjectDataSource>

     

    And the following ReportViewer tag: 

        <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="400px" Width="400px">
            <LocalReport ReportEmbeddedResource="ReportViewerCrash.Report1.rdlc" ReportPath="Report1.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1_databases" />
                </DataSources>
            </LocalReport>    
        </rsweb:ReportViewer>

     

    Hope this helps,
    Brad.

  • Re: Using business objects as data source for MS Report rdlcs with WAPs

    05-05-2006, 11:48 AM
    • Member
      35 point Member
    • GMan6
    • Member since 04-07-2006, 4:40 PM
    • Posts 7

    The problem with this is you are creating a business object datasource from a dataset.

    My approach is using a class that returns a generics class of my class type.  This normally is autodetected once compiled in a web site's App_Code folder when you open an rdlc and look at the website datasource window.

    It was confirmed that this is a bug with WAP's that cannot be addressed until SP1.  The bug is the WebsiteDatasource window does not appear or update with the WAP generics classes.  I was told they are trying to find a workaround and will keep me posted.

    I am correct in saying you are creating a dataset to bind to correct?  This is not going to work for the generics report object datasource approach right?

    Greg

  • Re: Using business objects as data source for MS Report rdlcs with WAPs

    06-17-2009, 3:11 PM
    • Member
      2 point Member
    • svp
    • Member since 06-17-2009, 2:17 PM
    • Posts 1

    Hi Greg,

    Were you able to resolve this issue? I am also having the same issue. I have a ASP.net Web application (and not a web site) and I want my classes as the data source for the report, but the classes do not show up in the data source window. I need to have a report and bind to my business objects..

    Your response really appreciated.

     

Page 1 of 1 (4 items)