4
Answers

how to Export Merge PDF file using C#

Naeem Khan

Naeem Khan

14y
3.3k
1
hello friends,
I have problem with Crystal report actually i want to marge to PDF file using C#... i have two reports one is total of employees and second is Break Up of Employees salary which call annexure.. so i want to export both file in one time.. so tell me if its possible to Marge Tow PDF file into C#... if yes then please give me Code or any kind of Example..........

thanks in Advance
 
Answers (4)
0
Mahesh Chand

Mahesh Chand

2 286.9k 123.7m 14y
Are you exporting (generating PDF) at run-time without seeing the report?

I guess question is, do you see data on the report?
I suggest you first generate report in the Form and try to see data there.
0
Naeem Khan

Naeem Khan

NA 573 638.2k 14y
thanks for the reply i think you did not understand what i want.... well i have to reports form one is Salary and second is Annexure when i click annexure button than annexure form comes the problem is that when i click on export button it should be export  both data data into PDF file ... but its not exporting....
0
Mahesh Chand

Mahesh Chand

2 286.9k 123.7m 14y

There is no built-in feature of merging PDF files in C#.
What you need is, get data from database in a DataSet (two DataTables) and create two different sections of a single report. In that way, you are generating a single report.
 
0
Felipe Ramos

Felipe Ramos

NA 2.6k 91.4k 14y
Naim if you want to keep both together with the least amount of work, I would say to try to create another Crystal Report as a container and add both report as subreports. If you want to merge the files you can use a free library like iTextSharp and you can find a good merge code at http://alex.buayacorp.com/merge-pdf-files-with-itext-and-net.html. iTextSharp could be set up using byte arrays, filepath, or streams so you shouldn't have a problem there.