472,983 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

C# .NET web application - printing the forms

Hello,

I have an application written in C# on visual studio .NET. It is a web
aplication.
The application consists of many different forms, that users
occassionaly want to print out for filing.
When they log to application (through web browser) and choose the
print option, on the right margin few cm get cut off (so some fields
do not print out).
Is there any function that ensure that when user pritns he gets the
entire page which is displayed?

Thanks & Regards,

Suzann
Nov 16 '05 #1
4 6410
Suzann,

The only thing I can think of to help you is to decide how much data fits on
a page. For example, one way would be to create a blank html page and a
table (just in notepad), then keep increasing the size, trying to print the
table each time, until you think the you've reached the maximum px's you
think should be permitted on a deafult A4 (or letter, depending on where
your clients are), then ensure that any grids or data you display fits
within this bounds.

Not ideal, but it should work for cases where people printing the data are
using a standard. I.E. Portrait A4 [Europe/Africa/Asia/Aus] (or Letter[US]).

Dan.

"Suzanka" <su************@nbad.com> wrote in message
news:87**************************@posting.google.c om...
Hello,

I have an application written in C# on visual studio .NET. It is a web
aplication.
The application consists of many different forms, that users
occassionaly want to print out for filing.
When they log to application (through web browser) and choose the
print option, on the right margin few cm get cut off (so some fields
do not print out).
Is there any function that ensure that when user pritns he gets the
entire page which is displayed?

Thanks & Regards,

Suzann

Nov 16 '05 #2
???
I search from Internet, the result are:

(1)<script defer>
function SetPrintSettings() {
?// -- advanced features
?factory.printing.SetMarginMeasure(2) // measure margins in inches
?factory.SetPageRange(false, 1, 3) // need pages from 1 to 3
?factory.printing.printer = "HP DeskJet 870C"
?factory.printing.copies = 2
?factory.printing.collate = true
?factory.printing.paperSize = "A4"
?factory.printing.paperSource = "Manual feed"
?// -- basic features
?factory.printing.header = "This is MeadCo"
?factory.printing.footer = "Advanced Printing by ScriptX"
?factory.printing.portrait = false
?factory.printing.leftMargin = 1.0
?factory.printing.topMargin = 1.0
?factory.printing.rightMargin = 1.0
?factory.printing.bottomMargin = 1.0
}
</script>
(2)
<script language="javascript">
??function printsetup(){
??// setting
??wb.execwb(8,1);
??}
??function printpreview(){
??// preview
????
??wb.execwb(7,1);
?????
????
??}
??function printit()
??{
??if (confirm(''''Confirm?'''')) {
??wb.execwb(6,6)
??}
??}
??</script>
</head>
<body>
<OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"
height=0 id=wb name=wb width=0></OBJECT>
<input type=button name=button_print value="Print"
onclick="javascript:printit()">
<input type=button?name=button_setup value="Page Setting"
onclick="javascript:printsetup();">
<input type=button?name=button_show value="Preview"
onclick="javascript:printpreview();">
<input type=button name=button_fh value="close"
onclick="javascript:window.close();">
Good luck!
:)

"Suzanka" <su************@nbad.com>
??????:87**************************@posting.google .com...
Hello,

I have an application written in C# on visual studio .NET. It is a web
aplication.
The application consists of many different forms, that users
occassionaly want to print out for filing.
When they log to application (through web browser) and choose the
print option, on the right margin few cm get cut off (so some fields
do not print out).
Is there any function that ensure that when user pritns he gets the
entire page which is displayed?

Thanks & Regards,

Suzann

Nov 16 '05 #3
Suzann,

The only thing I can think of to help you is to decide how much data fits on
a page. For example, one way would be to create a blank html page and a
table (just in notepad), then keep increasing the size, trying to print the
table each time, until you think the you've reached the maximum px's you
think should be permitted on a deafult A4 (or letter, depending on where
your clients are), then ensure that any grids or data you display fits
within this bounds.

Not ideal, but it should work for cases where people printing the data are
using a standard. I.E. Portrait A4 [Europe/Africa/Asia/Aus] (or Letter[US]).

Dan.

"Suzanka" <su************@nbad.com> wrote in message
news:87**************************@posting.google.c om...
Hello,

I have an application written in C# on visual studio .NET. It is a web
aplication.
The application consists of many different forms, that users
occassionaly want to print out for filing.
When they log to application (through web browser) and choose the
print option, on the right margin few cm get cut off (so some fields
do not print out).
Is there any function that ensure that when user pritns he gets the
entire page which is displayed?

Thanks & Regards,

Suzann

Nov 16 '05 #4
???
I search from Internet, the result are:

(1)<script defer>
function SetPrintSettings() {
?// -- advanced features
?factory.printing.SetMarginMeasure(2) // measure margins in inches
?factory.SetPageRange(false, 1, 3) // need pages from 1 to 3
?factory.printing.printer = "HP DeskJet 870C"
?factory.printing.copies = 2
?factory.printing.collate = true
?factory.printing.paperSize = "A4"
?factory.printing.paperSource = "Manual feed"
?// -- basic features
?factory.printing.header = "This is MeadCo"
?factory.printing.footer = "Advanced Printing by ScriptX"
?factory.printing.portrait = false
?factory.printing.leftMargin = 1.0
?factory.printing.topMargin = 1.0
?factory.printing.rightMargin = 1.0
?factory.printing.bottomMargin = 1.0
}
</script>
(2)
<script language="javascript">
??function printsetup(){
??// setting
??wb.execwb(8,1);
??}
??function printpreview(){
??// preview
????
??wb.execwb(7,1);
?????
????
??}
??function printit()
??{
??if (confirm(''''Confirm?'''')) {
??wb.execwb(6,6)
??}
??}
??</script>
</head>
<body>
<OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"
height=0 id=wb name=wb width=0></OBJECT>
<input type=button name=button_print value="Print"
onclick="javascript:printit()">
<input type=button?name=button_setup value="Page Setting"
onclick="javascript:printsetup();">
<input type=button?name=button_show value="Preview"
onclick="javascript:printpreview();">
<input type=button name=button_fh value="close"
onclick="javascript:window.close();">
Good luck!
:)

"Suzanka" <su************@nbad.com>
??????:87**************************@posting.google .com...
Hello,

I have an application written in C# on visual studio .NET. It is a web
aplication.
The application consists of many different forms, that users
occassionaly want to print out for filing.
When they log to application (through web browser) and choose the
print option, on the right margin few cm get cut off (so some fields
do not print out).
Is there any function that ensure that when user pritns he gets the
entire page which is displayed?

Thanks & Regards,

Suzann

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Marcin Zmyslowski | last post by:
Hello all! Are there any special tools or ways in ASP to print a filled form? I used to use MS Access 97 and there were reports special created for printing forms. Thanx for posts Marcin...
1
by: tremor | last post by:
I'd like to print a form based on the filters currently applied to it (these are again based on selections in combo-boxes). The form has multiple subforms, and as I try to print it, it prints all...
0
by: Suzanka | last post by:
Hello, I have an application written in C# on visual studio .NET. It is a web aplication. The application consists of many different forms, that users occassionaly want to print out for filing....
1
by: Dan | last post by:
Is there a way to enumerate through all the forms that an application has created?
0
by: coolsilver.net | last post by:
I am not sure if I am in the right group. My problem is this: My VB.NET application prints to the Epson printer using Epson OPOS drivers. I have downloaded the Epson ADK for .NET from the...
0
by: Chetana | last post by:
I have created a report in windows application using c#.net. This report takes runtime columns and values and it is quite big. So the form has both horizontal and vertical scrollbars. All the help...
1
by: paquer | last post by:
I have forms that are used in the office as well as in the field. I want user's to be able to print out an exact copy of the form for "in the field" data entry. (Yes we are still stuck in the 90's....
1
by: tmh86 | last post by:
I am currently building a database within Access 2007. I have a form that is populated via vba coding and thereform is not stored in a specific table. I have created a button that essentially runs...
2
by: DaveRook | last post by:
Hi I am coding a windows app in C#. The user enters a part number, clicks the button and information about the part number is displayed on the page, including text and graphics (pictures of...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.