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

Report with optional data

edited December 2006 in General
We are working on a report with some optional fields in the detail band. The
layout is simple:

label1:
label2:
label3:
label4:
label5:

Let label2 and label 4 be optional. When there is no data or specific data
these labels shout not print and the layout shout be:

label1:
label3:
label5:

What is the best way to achief this?

thanks in advance

Ton

Comments

  • edited December 2006
    I'd use a JIT pipeline with two fields: labelfield and datafield. Then set
    the .RecordCount of the JIT pipeline. Make sense?

    --
    Ed Dressel
    Team DM
  • edited December 2006
    Ed,

    Thanks for your answer but I don't think it is the solution.
    I will try to make myself clear: the datasource for the report is a view
    from a database. For every record in the table there will be a report and
    depending on the data in some of the fields in a record some labels/values
    should or should not print.
    In then resulting report we want no white space when a label/value is not
    printing so the next label/values should move.

    Is this more clear?

    Ton

  • edited December 2006
    > Thanks for your answer but I don't think it is the solution.

    yes... and, given the information I have, it would still work. The JIT could
    read from the view and determine the record count prior to printing.

    If you want to use a different method, you could set the detail band's
    .Visible property depending on the condition in the BeforePrint
    event--should work in RAP just fine.

    --
    Ed Dressel
    Team DM
  • edited December 2006
    > yes... and, given the information I have, it would still work. The JIT

    Ed, I think I don't understand you. The record count is unimportant, it is
    the value of certain fields in a record that determine the printing. My
    problem is the shifting up of the next fields to prevent the white space
    that would result from making the label/value invissible. But then again, i
    never used JIT, I will read the documentation.
  • edited December 2006
    > Ed, I think I don't understand you.

    I think I do :-)


    it's really important. Lets say you have 10 records but only want to print
    7, right?


    Exactly, so if you don't want to print record 3 from the dataset, then
    record 3 for the JIT pipeline is record 4 from the dataset. Make sense?

    It may be easier to set the Detail band's visible property.
    --
    Ed Dressel
    Team DM
  • edited December 2006
    Let's try again ;)

    For every record in the view there will be 1 report, I want to print all the
    records. So in the detail band I only print the fields of 1 record. Some
    fields will be supressed, depending on the value in these fields. The report
    should look at these values and in some cases suppress the printing of the
    label/value pair fore these fields and shift the next labal/value pair (from
    another field in the record) up to prevent unnessecary white space.



This discussion has been closed.