Group: Last data record & data record count
My report:
Detail:
------------------------------------------------------------------
1 ... Description
Comment
-----------------------------------------------
... Description 1
Comment 1
( ----------------------------------------------
) I don't want to see this line on the report!
------------------------------------------------------------------
2 ... .................
------------------------------------------------------------------
Has anybody an idea how to solve this problem?
Is it possible to get the last or the next data record in a group (like:
getLastInGroup or getNextInGroup)?
How to get the number of data records of a group?
Detail:
------------------------------------------------------------------
1 ... Description
Comment
-----------------------------------------------
... Description 1
Comment 1
( ----------------------------------------------
) I don't want to see this line on the report!
------------------------------------------------------------------
2 ... .................
------------------------------------------------------------------
Has anybody an idea how to solve this problem?
Is it possible to get the last or the next data record in a group (like:
getLastInGroup or getNextInGroup)?
How to get the number of data records of a group?
This discussion has been closed.
Comments
very flexible and it would be fairly easy.
Edward Dressel
Team DM
with each other in the report builder and there is no possibility to insert
a boolean field.
Is there any solutiion to do it with the RAP?
look at using JIT pipelines and creating a field that indicates if it is the
last.
Just
1) create a class structure that holds the data
2) Create a TObjectList of the class structure
3) Creat the pipeline & fields, and implement the OnGetFieldValue event.
This shouldn't take more then an hour in a more complex scenario, and
actually improves the speed of long/complex reports.
Edward Dressel
Team DM
Below is a simple example that keeps track of the last detail for each group
in a separate summary query. You should be able to perform these tasks in
RAP.
http://www.digital-metaphors.com/tips/LastDetailInGroup.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
There is still a problem with this method because I have a sort index in our
database. I can't rebuild the data because the report builder groups in
another way then the SQL!!
Regards,
Manuel Neubauer
ReportBuilder does not have a built-in way to detect the last detail of a
group/page/report. This is something we are researching to add for a later
release. Currently it is necessary to perform some sort of pre-processing
to determine when each group will end before the report is generated. This
was done with the second summary query in the example. Another option may
be to generate the report to a 'dummy' TppDevice object to count the amount
of details per group, store this number and use the information when
generating the report a second time to screen, printer, etc.
uses
ppDevice
...
lDevice := TppDevice.Create;
lDevice.Publisher := Report.Publisher;
Report.PrintToDevices;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
It doesn't take very long and ends up creating very fast reports.
Edward Dressel