Click here to Skip to main content
11,635,098 members (76,571 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi,
I am trying to Print Gridview data with Extra Info Like Receipt Asp.Net

I am using Print code

grdReport.RenderControl(hw);

building string data and using js to print.

Print is working fine but i am unable to add extra details like company name on top and address at bottom.

In c# Asp .Net
Posted 8-Jan-13 6:21am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thnx @ Christian Graus

completed with javascript kept a hidden div

and printed by unhiding it and then kept it hidden

new_window.document.write(header.outerHTML);
               new_window.document.write(grd_obj.outerHTML);
               new_window.document.close();
               new_window.print();
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I don't understand why you need 'print code'. You just need a window that shows exactly what you want to print and calls window.print in javascript. You can add any info you want, it will all print.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,736
1 Sergey Alexandrovich Kryukov 8,419
2 Mika Wendelius 6,845
3 F-ES Sitecore 2,354
4 Suvendu Shekhar Giri 2,205


Advertise | Privacy | Mobile
Web03 | 2.8.150728.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100