473,397 Members | 1,961 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,397 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 6442
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.