Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

Skipping Certain Records in the Data Pipeline

edited January 2015 in RAP
Is it possible to skip a detail line's particular inclusion in a report?
Rather than do some very complicated work that can't be done in a
query, I'd like to include a base set of data, then run each resulting
record through a Passthrough function to see if it should actually be in
the report.

Ideally, if the record to be skipped is the only one in the group, I'd
like to skip the group headers as well. And certainly not have the
record included in any DBCalc functions in group footers.

Comments

  • edited January 2015
    Hi Steve,

    If you just need to hide the detail band for certain field values, you
    can toggle its visibility (or toggle certain components' visibility)
    inside the DetailBand.BeforePrint event.

    begin
    Report.DetailBand.Visible := Report.DataPipeline['MyField'] <>
    'somevalue';
    end;

    This will not skip group headers and footers and summary calculations
    because these access the dataset on their own.

    If you need to skip a record at the dataset level, you will need to do
    so using DataPipeline events and routines. See demo 116 of the main
    reports demo for an example of this. It is not possible to do this
    completely from RAP.

    The best option of course is to filter your dataset using a SQL query
    before it is passed to ReportBuilder. This allows your database to do
    what it's good at (filtering data) and ReportBuilder do what it's good
    at (displaying data) :).

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.