choose some items and print it

edited 3:01PM in FastReport 3.0
<span style='font-size:10pt;line-height:100%'>Dear sirs
Good day for you
This is the first sharing for me , so i hope to hep me with details

I have table contains 20 cells and some of this cell full and other is empty,So assume the cells No. (1,2,5,7,9,15,18,19,20) is full and the other is Empty

Now how I can choose these cells and print it (For one Row only) and arrange it with good view on the report

Note: look here cell No. 3 is Empty so i don't want leave the place of the cell (3) and make space area on the report ( I want to put cell (5) on the place of cell (3) )

I hope to understand me

Thanks</span>

Comments

  • edited 3:01PM
    up

    pls hele me
  • edited 3:01PM
    There are a number of options (in increasing order of complexity):

    Move the data into a grid and print the grid.

    Use a dynamically created SQL statement that only extracts the filled cells (columns?).

    Create the report at runtime.

    These are the ones I can think of at the moment, there may be other alternatives.
  • edited 3:01PM
    Using Delphi and IBX components it would be something like this

    with TIBquery1 do
    begin
    SQL.Clear;
    SQL.Add('SELECT ');
    SQL.Add('COLUMN_A AS VALUE_1');
    SQL.Add(',COLUMN_C AS VALUE_2');
    SQL.Add(',COLUMN_F AS VALUE_3');
    SQL.Add(',COLUMN_G AS VALUE_4');
    SQL.Add(',COLUMN_H AS VALUE_5');
    SQL.Add('FROM TABLE_X');
    SQL.Add('WHERE COLUMN_Y=x');
    Open;
    end;

    x would be an integer
    the report would refer to the query's VALUE_x column.
    Unfilled columns on the report could be handled by CASTING a value,
    the form depends on the datatype, or by referring to a blank or
    NULL field in the table.

    SQL.Add(',COLUMN_NULL AS VALUE_6');
    SQL.Add(',COLUMN_NULL AS VALUE_7');

    Hope this helps.
    As a matter of principle I never use tables references in
    reports, always use queries.

    Peter
    Technisoft

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.