473,325 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 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 6437
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.