RTL In Fast Report
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?!
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
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.
http://www.fast-report.com/en/forum/index....amp;#entry18583
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?!
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