So, I came up with this solution(rather, i would call it as workaround). Approach is to select the inner html of the control and print only this area. To do so, i am selecting the inner html from the control and setting it as a HTML source of an IFRAME which is of size 0x0 and printing it immediately.
Following is the Javascript from the aspx page to this. I have taken reportviewer control for now.
If you are using this for reportviewer, just keep in mind that you are only printing the current page instead of all the visible pages.
I still need to work on getting the styles from the parent page and applying it on the IFRAME so that we dont miss any style information.
No comments:
Post a Comment