RTL In Fast Report

edited June 2010 in FastReport 4.0
Hello for all.
I a table of customers list.
i get a report like this: Select * FROM Customers
and it returns the list of customers!

Code.....Name.....Address
1...........A...........AddA
2...........B...........AddB
3...........C...........AddC
4...........D...........AddD


Now! I want a report (with FastReport4) which displays this report in tow columns!

yes! i know i can do it just setting the Columns property of the Page to 2;

but I want to get my report to start from right side of the page! this is my problem!
understand?!
I want my report just like this


...............Column2................................. Column1
Address.......Name.....Code......|| Address....Name....Code
AddC.............C...........3.........|| AddA...........A...........1
AddD.............D...........4.........|| AddB...........B...........2


OK?!
can anyone help me?! >

Comments

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 7:30AM
    Your problem is sorting the data, not the report layout.
    Find a way to sort your data in the sql and your life will be much easier.
    My suggestion: add a field to your data, probably inside your sql lines, just for the ordering.
  • Anu de DeusAnu de Deus Hampshire, UK
    edited 7:30AM
    But if you really want the hard way, take a look at my last entry in this topic:
    http://www.fast-report.com/en/forum/index....amp;#entry18583
  • edited 7:30AM
    Anu de Deus...

    oh! no man!!

    it is not easy to sort in SQL query for this!

    suppose we have a table with Code, Name, Address and code is PK.

    and now we have 200 records in this tables with Code starts from 1 to 200.

    and i want to be my report tow columned and first column must be on right side and second on left side!

    how can you get a query sorted like you saying?!
    can you explain?!

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 7:30AM
    I can't give you a full direct answer, only ideas (your problem is quite complicated).
    I thought you could start by doing something like this:

    select *, 0 as Ordering
    from yourtable

    then apply some logic to it by code, like you pre calculate what order you need it to display (in a standard 2 columns report), and set the field values.

    Suppose you know that it will fit 5 records in each column per page, so you need to swap recs 1-5 by 6-10.
    So (simplified code):
    For i:= 1 to 10 do
    if i <5 then
    record.ordering.asInteger := i+5 // so 2 becomes 7 , for example
    else
    record.ordering.asInteger := i-5 // and 8 becomes 3, for example

    Then you re-select the resulting data with an
    order by Ordering

    Just an idea, you will need some considerable work to make it work

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.