printing a report in windows application using c# [Resolved]

Posted by Nishadullas under C# on 11/28/2011 | Points: 10 | Views : 8284 | Status : [Member] | Replies : 6
Hi..
I am in requirement to print a report in A4 size in windows application.
The records in report should appear like data in datagridview but the only difference here is the datagridview should be vertically arranged and there will be 4 datagridviews in the report.

Can this be done in crystal report,MsWord or anything else i.e. arranging the dynamic datas in a vertically arranged datagridview format and printing that in an A4 size paper .?
i am attaching an image in which i have mentioned a rough idea how the records will look like.
Please try to help me out...

Thank you
Nishad




Responses

Posted by: Arefin on: 11/29/2011 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi Nishadullas,

An alternative solution:
Plz see the attached image. You can put your datagridviews on a WinForm according the image and just print the WinForm. It is really very easy but dont know how complex your requirement. You can visit the below links for WinForm printing:

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/eb80fbbe-6b89-4c3d-9ede-88a2b105c714/
http://www.c-sharpcorner.com/uploadfile/srajlaxmi/printing-windows-form-in-C-Sharp-net/
 Download source file

Thanks,
Arefin

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Arefin on: 11/28/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Nishadullas,

Roughly got your point. Yes, this is possible with Crystal report. You can try with DataSet and DataTable concept.

Thanks,
Arefin

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishadullas on: 11/28/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Arefin,
Thank you for replying.

Dear Arefin it would be very helpfull for me if i would get a demo regarding this concept as i have less experience in this matter.
So if you don't mind to help, please forward me a demo project or any link which will help me.

Thank you.

regards
Nishad

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishadullas on: 11/29/2011 [Member] Starter | Points: 25

Up
0
Down
Hi... Arefin,
Thanks a lot and its working but still a minor problem. i am facing a limitation to complete my task as i don't get the complete view of the window form in print preview because its not possible to adjust my window form in A4 size as it takes the height and width in pixels and so i don't get the complete height of my form so i have done it in different method by using a panel and creating the image of that panel but still not perfectly as i thought. Anyway i m trying my level best.
If possible can u help me to grab the complete image of the panel and the panel should be of A4 size fitting exactly on the print page.

Once again thanking you a lot for replying and helping me.

regards
Nishad


Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishadullas on: 12/2/2011 [Member] Starter | Points: 25

Up
0
Down
Hi..
Arefin.

i met my requirement, thank you for helping me out.

regards
Nishad

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Arefin on: 12/2/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Nishad,

You are Welcome :)

Thanks,
Arefin

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response