Active Report Detail section issue

Posted by: jonathanlau2828 on 6 March 2019, 8:43 am EST

    • Post Options:
    • Link

    Posted 6 March 2019, 8:43 am EST

    Hi,

    In our project, we are populating the data through WebAPI and binding it to ActiveReport in Code Behind (.cs) using C# as dataset.

    The problem we are facing, the detail section is showing only one record (last record) though the dataset has more than 10 records. Please let us know how do we display all 10+ records in the detail section. Please find attached the sample code we used for our development. We are using ActiveReport v12 and .NET framework 4.6.2.

    ActiveReport.zip

    issue-in-active-report.zip

  • Posted 7 March 2019, 1:57 am EST

    Hello Jonathan,

    You need to set the data in FetchData event to display the correct data as follow:

    
    private void Report1_FetchData(object sender, FetchEventArgs eArgs)
    {
        count = (count + 1);
        if ((count < dataSet.Tables(0).Rows.Count))
        {
            eArgs.EOF = false;
            Fields("CompanyName").Value = dataSet.Tables[0].Rows[count]["CompanyName"];
            Fields("DetailsDesc").Value = dataSet.Tables[0].Rows[count]["DetailsDesc"];
            Fields("Date").Value = dataSet.Tables[0].Rows[count]["Date"];
    //... So on
        }
        else
            eArgs.EOF = true;
    }
    
    

    Also, you can refer to the “To use an Unbound data source” topic in the following documentation link:

    https://help.grapecity.com/activereports/webhelp/AR12/webframe.html#BindReportstoaDataSource.html

    Hope it helps.

    Thanks.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels