473,386 Members | 1,997 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,386 software developers and data experts.

How to print a report (VB6) with landscape

code as follows:

Private Sub Command1_Click()

Dim db8 As ADODB.Connection
Dim rst8 As ADODB.Recordset

Set db8 = New ADODB.Connection
Set rst8 = New ADODB.Recordset

db8.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\( My database).mdb;Jet OLEDB:Database Password= ( My Pass word);Persist Security Info=True"

Set DataReport1.DataSource = rst8
CommonDialog2.ShowPrinter
If CommonDialog2.Orientation = cdlPortrait Then
Printer.Orientation = cdlPortrait
Landscape = False
Else
Printer.Orientation = cdlLandscape
Landscape = True
End If

DataReport1.Show

[ at preview time shows report width is larger than paper width, though I set the printer at landscape position]
Sep 20 '10 #1
1 6672
JDDDDD
15
Dude this so happened to me this one time. its cause the length of the report is bigger den a page. But thats no problemo to solve guy, just drag the edge of the report in until it becomes smallerz. Then try again and again until its small enough to print

Respect
Sep 21 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Michael Dekson | last post by:
Access 97. I make a report and I want first to see report and then print report without type CONTROL + P. Can I make some button or can I see print button in toolbar meny. Thanks
0
by: Dexter | last post by:
Hello all, I need to configure a page to print in the landscape format. Using ASP.NET or JavaScript. Thanks Dexter
5
by: Tony Dong | last post by:
Hi there, I am newer for dot net I want to make a report and then print it, the report may include images and text, how can I do that, any one can give me a suggestion? I know how to...
3
by: PebblePicker | last post by:
hi all, is it possible to change print format to landscape using javascript/css or anything else which is suppoted in MOZILLA ? I could not find it anywhere.
1
by: Seemaraj | last post by:
Hi to all I have a report being designed using data report in VB, i would like to design and view the report in landscape,which by default is in Portrait, due which i am not able to fit the contents...
2
by: felicia | last post by:
Can anyone help me on How to use Data Report in VB and how to print report? I hope i can generate the Data Report without Data Environment because I am not fammiliar with it. Simple adodb or adodc...
4
by: sarn555 | last post by:
Dear, I want to print a VB6 form in landscape orientation and it should be done in a running mode. I mean through coding everything must be done at runtime. By default, the Form.PrintForm method...
1
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, How can print data report in landscape mode./ Thanx >> ALI <<
3
by: fxeko | last post by:
Hi all... I have got a problem about passing data parameter in data report VB6 my problem: x= "admin" how to send value of x variabel to data report Thanks for your advabced
1
by: abil | last post by:
i've already build a program that contain all the price, the change given back to the customer but i dun have no idea which function i should use to do program print report... #include <cstdlib>...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.