Detail next record read

Posted by: darin on 14 April 2026, 8:50 am EST

  • Posted 14 April 2026, 8:50 am EST

    We have a report (page, group, detail) driven from a SQL script. We would like to be able to skip a record if a certain criteria is met, and just go to the next record.

    So, basically in the detail section:

    if (rpt.fields(“skip”)==“YES” {read next}

    else

    { continue with the detail logic and displays}

    Is something like that possible that i am just missing in the documentation?

  • Posted 15 April 2026, 4:48 am EST

    Hi,

    Thank you for reaching out to MESCIUS support.

    Yes, you can achieve the reported requirement in ActiveReports in multiple ways.

    Method - 1: Using Detail Format Event

    public void Detail_Format()
    {
    	if (rpt.Fields["skip"].Value.ToString() == "YES")
    	{
    		this.Detail.Visible = false; 
    	}
    	else
    	{
    		this.Detail.Visible = true;
    	}	
    }

    Method - 2: Using WHERE clause in SQL

    You can filter out the records directly at the data source level by modifying your SQL query, for example:

    SELECT *
    FROM YourTable
    WHERE skip <> 'YES'

    We have attached two samples for your reference, where we have implemented the same.

    Please let us know if you have any doubts or need further assistance.

    Regards,

    Prabhat Sharma.

    SkipRow.zip

Need extra support?

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

Learn More

Forum Channels