Hello All,
I am using ireport designer 5.1.0 , accordong to the requirement i need to generate a report where it will contain no of items imported in a warehouse, this i can do easily, but i m banging my head over creating same pdf with 3 times merged into a same pdf. So the inspection guy can take the print out keep one copy to himself and share the rest with other offical purpose.
For example: If items ITEM001, ITEM002, ITEM003 are recorded. I need to generate like
Copy - 1
Items SL No
====== =======
ITEM001 1
ITEM002 2
ITEM003 3
Copy - 2
Items SL No
====== =======
ITEM001 1
ITEM002 2
ITEM003 3
Copy - 3
Items SL No
====== =======
ITEM001 1
ITEM002 2
ITEM003 3
I have followed the this post - http://stackoverflow.com/questions/10912710/ireport-multiple-copies-of-same-report-with-different-label.
so far I am able to create a 3 sets of data, but how to make sure the header details should be repeated only for each Sets of data (ie. for Copy1, Copy2 ,Copy3) & how can i calculate the sl no in each set.
Kindly help me.
Regards,,
Amit
@teodord, thanks for reply, as u have suggested i do have an extra column which would speciify the group no for each record. Foll. is the sql query.
=====================================================================
SELECT
copy, item_master.`id` AS item_master_id, sequence
FROM
`item_master` item_master
CROSS JOIN
(
Select 'COPY1' as copy, 1 as sequence
UNION
SELECT 'COPY2' as copy, 2 as sequence
UNION
SELECT 'COPY3' as copy, 3 as sequence
) x
GROUP By COPY, item_master.`id`
Order By COPY
=====================================================================
"You can exploit the extra column in the report by using it as a report field in the expression of a report group. Having a group break every time that column changes its value allows you to put the CopyN and the SL No fields in the group header section."
I didn't get the above part in your post. Since i am new to this ireport designer. If u can provide any possible resources. I might be of great help.
Thanks,
Amit