Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Change The Paper Size Before Printing In Data Report.


I have a problem regarding producing the summary report of the inventory system I am developing in our company. The problem is that I cannot produce a report in data report that is longer than A3 size of a bond paper.

In the design, I tried to enlarge the width but when I run the program, there is an error "Report width is larger than the paper width.

Please help me to have a code that will setup the paper size according to user's choice and preview the report an error.

Note: I dont want code that access Crystal Report. I already know how to change paper size in Crystal Report. What I want to know is the application of dynamic paper sizing in Data Report within the Visual Basic 6.0




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Change Data Report Paper Size At Run Time
i design my reports using Data Report. the reports will print into preprinted form with many size such as A4, F4 etc. my the default printer is set to A4 size. this cause some of the reports cannot print properly, the printing show in second page. (actually it is in 1 page which the paper is F4, higher than A4).

now my problem is: how to change the papersize for data report at runtime? say my default printer is set to A4, then i want to show some of the reports in B4 size, and some in F4 size...

i tried the printer.papersize, but it doesn work for data report.

is that possible to change the data report paper size in run time? How?

Change Paper Size For Data Report At Run Time
i had post this thread before but seems no one understand my problem...

in my program, i have 2 report. 1 is in Letter size (11in Height), another 1 is in custom size (14in Height), both report are in 8.5in Width and in Potrait.

How do i change the paper size in run time to allow to display the 1st report in Letter size and then also can display the 2nd report in the custom size(14in).

ps: Printer.Papersize doesn't change the data report paper size....

How To Change The Width Of Data Report To A3 Paper Size
I want to change the width of data report to A3 paper size,I dont know how ?

Printing Of Data Report In Half Size Paper
hello..
hope you can all help me with this...

i have a problem and i just want to know if this possible or not in vb.

i need to print a datareport in a half sized paper..
ex. 8 x 11 (short bond)

i need to print my report in a 8 x 5.5 paper size without ejecting the
paper . I am using an epson LQ2180 perinter..

i tried resizing the paper using
printer.papersize = 256

but the printer still get the default paper size
stated in the printer properties
although vb already accept the paper size i declare in my code.( i
checked it when i debug the code)

so please enlighten me with this.
thanks to you all!.
waiting for your quick reply.

thanks,
anna

Help For Printing A Report On A Legal Size Paper
Anybody know a way I can create a report that supports the size 8.5 X 14 in (legal) paper?
Datareport doesn't support this.
I don't have experience working with Crystal Reports (if anybody has an example for creating this type of report I would appreciate your contribution). I need it for a VB application, I have done reports on Crystal Reports but can't find a way to link it on a VB application in the way that if the contents of a database changes, it is reflected on the Crystal Report.
If anybody can help, please let me know.

Help For Printing A Report On A Legal Size Paper
Hello

I' using vb6 and crystal 7.0.

I created a report in crystal 7.0 .In cryustal report i Enter two lines
and single line characher data.

For ex.
School Name is...... (line 1)
School register
Number is............. (line 2)
When I print report on dot matrix printer on thta time only one sinlge line character line is printing but two lines character line is not printing on paper all charactres are missing.

What I do?

Default Paper Size When Printing Crystal Report From VB6
Problem:
When printing a crystal report from VB6, the default paper size sets to 'Letter'. I would like to change this to 'A4'. I have set the paper size of the crystal report to A4 and the default paper size of the printer to A4. When I print the report from crystal it prints fine but when I print the report from VB6, the paper size defaults to letter. This can be changed to A4 using the Advanced layout options but I want A4 to be the default.

Any ideas?

This is the bit of code that sets up the printer and prints the report.

CrRep.Destination = crptToPrinter
CrRep.PrinterSelect
CrRep.PrintReport

Thanks,

Sean

Data Report Paper Size
it's any way to customize de paper size on monitor when use the data report?

i sawit on letter size but needit half size

HELP! Data Report And Paper Size
Hello again. I go again with question. How to change the paper size on data report. My data report don't show anything, becouse the report size is biger then paper size, but I want to show any way, any if the paper is smaler.

Data Report On A3 Size Paper
I want to print on A3 size paper (approximately width 16 inches) using data reports through VB. When I tried it gave me an error as Report width larger than paper width.

Paper Size Of Data Report
hi,
I want to make my report of (15*12) in. But it is taking A4 size by default.How will I be able to do it??? Can Any body tell me.
Thanks in advance.

Bye

Paper Size Of Data Report
Hello
    I want to remove the horiz. scrollbar from my datareport.
    My data is not actually more than a window but because of the default paper size
    i can't remove it.
    I think the soln. is to reduse the paper size when application runs & set default when it closes.
But how it to be done using VB.

Pleae anybody...................

 

How To Set Paper Size For Data Report
I have a data report whose width is 10". When I'm trying to run the report, I'm encountered with the error " Report width is larger than the paper width".
I tried to set the orientation to landscape:

Code:

Printer.Orientation=2

But it isn't working. Can anyone tell me how to set the paper size and orientation?

Setting The Paper Size In Data Report
hi

would u tell me is there any method so that i can set my report size to as small as that of a 4" receipt paper..my printer is epson lx800 , dot matrix..i want to stop the paper after 4"

plz help..

A3 Size Paper Print Using Data Report In Vb 6.0
Hi All,

I want to generate a A3 size paper reports using data reports in vb 6.0.

But data report width restriction is there in vb 6.0. I installed sp4 also..but max allowing report width is around 16200.

How to do it?

Regards,
Rojasri.

Define Paper Size Using Data Report
I want to know about to increase or decrease paper sizes in data reports in vb 6.0,
is there any chance to fix the paper size with out using printer options. plz give me the margin sizes with numbers.

  what is the size for     A3 paper
          A4 paper

How To Custom Paper Size Of Data Report In Visual Basic 6.0
hello
i am working on a project using visual basic. i have to print a recept which is of 7.6 x 9.8 inch size. by default the paper size it prints is of A4 size page. so how to custom this size using code while printing data report in visual basic 6.0

Printing A Form Whose Size Is More Than The More Than 11* 8.5 Paper Size
Can anybody tell me how to print a Form whose size is more than the More than 11* 8.5 Paper size

Change Paper Size
what is the cording to change paper size and set as landscape .. what is the right cording i m trying like this

printer.papersize = 9
printer.oriantation = 2

its not working
y is that ??

what should i do

Change Paper Size
How to get the Data Report height after loading the Report?
How to change the user difined Printing paper size in VB?

How Can I Change The Paper Size???
Hi to all

I'm using VB6 and i make a report with the datareport (default of vb).

I 'm searching the Web to find how i can change the paper size of the printer that user select but nothing.

I have a report tha prints Folio - Letter but it hasn't the same margins with the vbprpsFOLIO.

When the user select a printer from print button ( In Microsoft DataReport) i want to change the paper size of that printer.



**Sorry for my bad English**

Thnks

Change Paper Size Through VB
Hi all,

can anyone let me how to change the paper size through VB code dynamically as per requirement, ie some of my data reports are using letter size papaer some using legal and some A4, I have tried printer.paperSize but it is not working ,

Thanks in advance

bye

Printing Paper Size
I am printing a Data grid to the printer in my application and use a the common dialog box to get the settings. The user can in the advanced settings set the paper size. How do I go about getting this infomation so I can set the paper size when I print. There isn't a property in the Object to get this.

Maybe a API Call????

Change Printer Paper Size
my DataReport paper size is larger than the printer default size

How to change paper size programatically?


Code:
Printer.PaperSize = PrinterObjectConstants.vbPRPSUser 'supported by the priner driver
Printer.Width = #### 'number in twips which is larger than my report width
OR

Code:
Printer.PaperSize = ...A2 'The constant for A2 which is also supported by the printer driver
won't work, it has no effect on the printer at all (for my program or system-wide) and the error still popups.


the printer is EPSON LQ-1050 (wich driver is packed with win98/ME)

I searched the forums for this, I found alot of articles, I read more than 50 one, I got nothing usefull.

and this is the same article I wrote in other forum with about 4 replies and had no answer.
http://www.vbforums.com/showthread.p...51#post1555751

any help please

Change Printer Paper Size
my datareport reportWidth is about 20000 twips witch equal about 330 mm

when change paper size of the printer sittings to A2 (420 mm width) it works
when change paper size of the printer sittings to any other (smaller): "Error: Report width is larger than the paper width"

I put the folowing code to change the paper size before DataReport1.Show:

Code:
Printer.PaperSize = 258 'equivalent to A2 paper size

or

Code:
Printer.PaperSize = PrinterObjectConstants.vbPRPSUser
Printer.Width = 20000
Printer.Height = 20000

But the code did nothing

How can I change printer paper size by code?

Note that the printer is compatible with Epson LQ-1050


Of course I searched the forums for this "Printer paper size" and found alot of articles most left with no answer or not atchived a solution

please I realy need your help

Please Help: How To Change Settings Of Paper Size?
Hi,

Could we change the settings of the paper size of the printer in windows using visual basic?How? And what is the synatx?Have browsed and come up with the line PRINTER.PAPERSIZE=VBPRPSA4.Is the liner correct and what are the other codes for papersize.

Thank you!

Change Paper Size Dynamically
i have problem with changing paparsize(A4,letter) using VB code.i use some code those dont take effect.
if any body have the solution please send me.
thanks

Change The Size Of Data Report From Portrait To Landscape
Hi! I had create a Data Report, but may I know can I change me Data Report Size from Portrait to Landscape?
If yes, can you teach me how to do that?

Thanks..

Chloe,

Printing On Custom Size Paper
Hi,

How do I print on a paper of size 254mm x 203mm?
After printing the paper should not scroll out. Because it is a roll of preprinted papers of same size.

Thanks in advance,
Ram.

Printing On Custom Size Paper
Hi,

How do I print on a paper of size 254mm x 203mm?
After printing the paper should not scroll out. Because it is a roll of preprinted papers of same size. (one record per page)

Thanks in advance,
Ram.

Printing A Form To A4 Size Paper
I'm trying to print a long form that has a height greater than that of the screen in VB4. Whenever I print the form, it gets cut off about three-quarters way down an A4 page. Any ideas on how to stop this happening? Could it be something to do with the particular printer driver I'm using?

Thanks,
Patrick Scahill,
Dublin,
Ireland

Printing On Custom Size Paper
Hi,

How do I print on a paper of size 254mm x 203mm?
After printing the paper should not scroll out. Because it is a roll of preprinted papers of same size.

Thanks in advance,
Ram.

Programatically Change Paper Size In Access 97
Hullo. You know that frustrated feeling you get when you know you are about finished with a niffty project, but can't quite make it click? That's where I'm at now.
The situation: Access97 database to track service level responses. db is "locked" using the Startup options in Access, to prevent users from touching the tables manually. Works fine and dandy. Report for printing said responses works fine and dandy designed on Legal paper.

The problem: Users cannot change the paper source for the report, so the staggering majority of them, who had last selected Letter in their other Access db's cannot change to Legal for this. I know that with PrtDevMode I can do the mojo I want, but, my poor blonde brain is having a meltdown figuring out how.

If standard wisdom is, "Just keep pounding, and you'll eventaully get it" I can live with that. I'll buy stock in the aspirin company, but, I'll deal. I'd rather not, though. If somebody has already blazed this trail, I'd gladly follow in their Wenceslas-ian footsteps, and be warmed by their knowledge and effort.

If further explaination or questions need to be asked, please let me know.

Many thanks!

Jim

How To Change Font Size Dynamically Through VB CODING In Data Report?
Hi,
How could we change the font size of a label box in datareport through VB CODING?. I tried the following but it shows the error message, "Object does not support this property or method"

DRSalB.Sections("section2").Controls("lblname1").FontSize = 10

Is code has any wrong syntax or there any other alternative methods?

Printing The Whole Form In A Specific Paper Size
Hi there,
i am a VB beginner just learning how to print a form. How do I print the whole form instead of just printing what can be seen on screen? I have read some threads in this forum but they seem too complicated for me .

As for printing to a specified paper size, I found a suggestion by hacibumbala:

Printer.PaperSize = vbPRPSLetter
Form.Height = Printer.Height
Form.Width = Printer.Width
Printer.PrintForm (this I put as Form.Printform )

but I got an error message:"Run-time error '486':Can't print form image to this type of printer"

Another thing is, how do I specify the size of paper? vbPRPSLetter is for letter size, right? What if I want to print in A4 size?

Thanks a lot!!

Printing To Predefined Size, Designed Paper.
Hi

I need to print some fields in a predefined size (3" * 2") card. The card has a predefined layout. I need to print the fields in the correct postion of the card. Printer is dot matrix printer. How can i do this in VB 6.

Please give some ideas .

I have attached a sample of the card layout.

Awaiting for reply ...
Thanx

Printing - Custom Paper Size ( Urgent )
I am developing a program in which i need to print some text at a specific location on a pre printed stationary of size 10" X 6" (Width = 10" and Height = 6" ) How ever every time I print it takes 10" as Height in Windows Xp

Pl. Answer me as early as possible

How To Customize Printing Paper Size At Runtime
How Can I Customize The Printing Paper Size At Runtime. I Need To Tell The Printer To Use A Page Setting Of Width=850 and Height =600. But I Am Not Able To Solve My Problem.... Please can u help me if you know how to do this at runtime?

It Can Be Done By Changing The Default Printer Setting But Apart From That I Want To Do This Without Changing The Default Printer Setting And In Runtime.
Thanks
If You Solve My Problem Do Mail Me At: udayan_chatterjee@mail.com

Set Paper Size For A Report
I'm trying to print a crystal report to a dot matrix printer. The paper size I want to print onto is 5 1/2 inchs (14cms) in height * 8.3 inches (21.1cms) in width but I can't find anywhere in crystal to set this paper size.

I have also tried going into the printer setup in windows but can't find an option to customize the paper size.

Can this be done from VB? Or how can I set the paper size?

Change Default Printer's Paper Size At Runtime
could anybody give me a sample code to change the default printer's setting (paper width/height,paper source, orientation) at runtime

Printing In Custom Paper Size In Visual Basic 6
Hello

I am using

OS = Windows XP
Visual Basic Enterprise Edition 6


I have a problem in Printing in pre printed bill .

Bill Size

Height : 6 inches Width of paper : 9.1 inches

I wish to print bill by bill, Pre printed stationery is continious paper, I wish to print in one bill after one bill the paper automatically skip to other bill.
the problem is : while printing the paper moves for A4/Letter and i cann't able to enable the Tear off Mode.


Please go through the below three codes and help me fix paper size

==================================================================================

I used three codes to print . But problem contious. There is no paper size in VB for my paper setting ( height 6 inches , width 9.1 inches)



I used three methods to print one is
--------------------------------------------------------

Printer.ScaleMode = ScaleModeConstants.vbTwips

Printer.Width = 13104
Printer.Height = 8640
.............................
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



Printer.EndDoc
Printer.NewPage
End Function

the above method while printing the paper moves for A4/Letter and i cann't able to enable the Tear off Mode.

How can i set paper size of Height : 6 inches Width of paper : 9.1 inches
====================================================
2. Second code creating Text file and printing by creating text files one of my friend suggestes
=======================================================


Call modBillPrinter.OpenPrintFile
Call modBillPrinter.PrintPLine(Chr(12))


Call modBillPrinter.PrintPLine(Space(10) + MakeString(Trim(cname), 15, ALIGN_LEFT) + Space(5) + MakeString(Trim(bno), 10, ALIGN_LEFT))
Call modBillPrinter.PrintPLine(Space(10) + MakeString(Trim(place), 15, ALIGN_LEFT) + Space(5) + MakeString(bdate, 10, ALIGN_RIGHT))
Call modBillPrinter.PrintPLine(Chr(12))
Call modBillPrinter.PrintPLine(Space(5) + MakeString(" S.NO", 5, ALIGN_LEFT) + Space(3) + MakeString("Particulars", 20, ALIGN_LEFT) + Space(3) + MakeString("Grms", 6, ALIGN_RIGHT) + Space(3) + MakeString("Wastage", 7, ALIGN_RIGHT) + Space(3) + MakeString("Rate", 4, ALIGN_RIGHT) + Space(3) + MakeString("MC", 5, ALIGN_RIGHT) + Space(3) + MakeString("SC", 5, ALIGN_RIGHT) + Space(3) + MakeString("Amount", 10, ALIGN_RIGHT))
Call modBillPrinter.PrintPLine(Chr(12))


Print #1, Spc(8 - Len(CStr(psno))); psno; Spc(3); '8
Print #1, particulars; Spc(20 - Len(CStr(particulars))); '17
Print #1, Spc(9 - Len(CStr(grams))); grams; '7
Print #1, Spc(8 - Len(CStr(wastage))); wastage;
Print #1, Spc(11 - Len(CStr(trate))); trate; '7
Print #1, Spc(9 - Len(CStr(mc))); mc; '7
Print #1, Spc(8 - Len(CStr(sc))); sc; '7
Print #1, Spc(12 - Len(CStr(amount))); amount '11


Print #1, vbCr
Print #1, Spc(76 - Len(CStr(Netamttxt.Text))); Netamttxt.Text
Print #1, Chr(12)


modBillPrinter.ClosePrintReport
Shell App.Path & "PRINT.BAT", vbHide
End Function

Here the problem is i cannot change font size ,
And i wish the usage of follwing for what following command used

1. Print #1, vbCr ?
2. Print #1, Chr(12)
3. Print #1, Spc(12
4. Print #1, vbCrLf


====================================================================
3 Third method - ( In this method no printing no out put in printer totally no print out
=====================================================================



Open "E:jewelprojectDSREPO.TXT" For Output As #1
Call Header
psno = 1

While psno <= sno

If tcount > 5 Then
Print #1, Chr(12)
Call Header
tcount = 1
End If

mg1.Row = psno
mg1.Col = 2: particulars = mg1.Text
mg1.Col = 3: grams = mg1.Text
mg1.Col = 5: wastage = mg1.Text
mg1.Col = 6: trate = mg1.Text
mg1.Col = 7: mc = mg1.Text
mg1.Col = 8: sc = mg1.Text
mg1.Col = 9: amount = mg1.Text

Print #1, Spc(8 - Len(CStr(psno))); psno; Spc(3);
Print #1, particulars; Spc(17 - Len(CStr(particulars)));
Print #1, Spc(6 - Len(CStr(grams))); grams;
Print #1, Spc(8 - Len(CStr(wastage))); wastage;
Print #1, Spc(7 - Len(CStr(trate))); trate;
Print #1, Spc(7 - Len(CStr(mc))); mc;
Print #1, Spc(7 - Len(CStr(sc))); sc;
Print #1, Spc(11 - Len(CStr(amount))); amount

tcount = tcount + 1
psno = psno + 1

Wend

For i = 1 To 9 - tcount
Print #1, vbCr
Next i

Print #1, Spc(5); "Discount : "; disctxt.Text; Spc(5); "VAT : "; vattxt.Text
Print #1, vbCr
Print #1, Spc(76 - Len(CStr(Netamttxt.Text))); Netamttxt.Text
Print #1, Chr(12)

Close #1
'Shell App.Path & "PRINT.BAT", vbHide
Shell "E:jewelprojectPRINT.BAT", vbHide
'Shell "c:1.txt", vbHide
End Function


Public Function Header()

cname = cnametxt.Text
bdate = datetxt.Text
place = cptxt.Text
bno = Bnotxt.Text

For i = 1 To 6: Print #1,: Next

Print #1, Spc(18); cname; Spc(42 - Len(Name)); bdate
Print #1, Spc(18); place; Spc(42 - Len(bno)); bno
Print #1, vbCrLf

Print #1, Spc(5); "Sl.No"; Spc(3); "Particulars"; Spc(6); " Grams";
Print #1, " Wastage"; Spc(3); "Rate"; Spc(3); "MC"; Spc(5); "SC"; Spc(6); "Amount"
Print #1, vbCrLf

My Problem : while printing the paper moves for A4/Letter and i cann't able to enable the Tear off Mode.

1. How can i modify above code to fix paper size Height : 6 inches Width of paper : 9.1 inches



========================================================================

Please help me to print properly in pre printed bill
=======================================================

A.Senthil kumar

Printing To 1/2 Size Of Short Bond Paper (Frustrating)
Hi there! I already have a code for printing and it's working fine.The code will print in one whole sheet of bond paper.

I would like to use a continous form (8 1/2 x 5 1/2) which is half of 8 1/2 x 11 (short bond paper). I would like also that after printing, even if the printout is just one line of text, the printer should eject the paper up to the perforation area only.


I came accross of a thread with the same problem but there was no reply to it.

Below is my code for printing. Can someone help with this please?

Code:
Private Sub cmdPrintRpt_Click()
'Add a textbox(hidden) and set it Multiline=true (but no scrollbar)
Dim i As Long
Dim j As Long
Dim strTmpDescArray() As String
Dim pagenum As Long, pagecount As Long

If lstRecords.ListItems.Count = 0 Then
MsgBox "There's nothing to Print", vbInformation, ProgName
Exit Sub
End If
CommonDialog1.CancelError = True ' Do this first

On Error GoTo ErrHandler ' Only need one error handler
Do
If Not pagenum = 0 Then pagecount = pagenum
pagenum = 1
'CommonDialog1.ShowPrinter
Printer.FontName = "Arial"
Printer.FontSize = 20
Printer.Orientation = vbPRORPortrait
Printer.CurrentY = 720 'Top Margin of .5"
Printer.CurrentX = 620 'Left Margin of .5"
Printer.Print "Sales Report"
Printer.FontName = "Courier New"
Printer.FontSize = 11
Printer.Print Tab(60); "Date Printed: "; Date
Printer.Print Tab(60); "Page " & pagenum & " of " & pagecount 'format as required
' pagenum = pagenum + 1 ' new page not till end of page
Printer.Print: Printer.Print

Dim Pagelength%, BottomMargin%, TopMargin%, ThreeLines%
Pagelength = 11 * 1440
BottomMargin = 1 * 1440
TopMargin = 0.5 * 1440
ThreeLines = 0.5 * 1440

'Print column headers
Printer.CurrentX = 220
Printer.Print LeftAlignText(lstRecords.ColumnHeaders(1).Text, MAX_WIDTH_COL1) & _
LeftAlignText(lstRecords.ColumnHeaders(2).Text, MAX_WIDTH_COL2) & _
RightAlignText(lstRecords.ColumnHeaders(3).Text, MAX_WIDTH_COL3) & _
RightAlignText(lstRecords.ColumnHeaders(4).Text, MAX_WIDTH_COL4) & _
RightAlignText(lstRecords.ColumnHeaders(5).Text, MAX_WIDTH_COL5) & _
RightAlignText(lstRecords.ColumnHeaders(6).Text, MAX_WIDTH_COL6) & _
RightAlignText(lstRecords.ColumnHeaders(7).Text, MAX_WIDTH_COL7) & " " & _
RightAlignText(lstRecords.ColumnHeaders(8).Text, MAX_WIDTH_COL8)
Printer.Print String(MAX_WIDTH_COL1 + MAX_WIDTH_COL2 + MAX_WIDTH_COL3 + MAX_WIDTH_COL4 + MAX_WIDTH_COL5 + MAX_WIDTH_COL6 + MAX_WIDTH_COL7 + MAX_WIDTH_COL8 + 1, "-") ' total 1 spaces in a line

'Print Data
For i = 1 To lstRecords.ListItems.Count

strTmpDescArray = FormatDescription(lstRecords.ListItems(i).ListSubItems(1).Text)

For j = 0 To UBound(strTmpDescArray) ' print each line of desc in separate line
If j = 0 Then 'print each text
If Printer.CurrentY > Pagelength - BottomMargin Then '****
Printer.NewPage
Printer.CurrentY = TopMargin
pagenum = pagenum + 1 '**** need to do before printing

'Repeat the Heading every page
Printer.CurrentX = 620 'Left Margin of .5"
Printer.FontName = "Arial"
Printer.FontSize = 20
Printer.Print "Sales Report"
Printer.FontName = "Courier New"
Printer.FontSize = 11
Printer.Print Tab(60); "Date Printed: "; Date
Printer.Print Tab(60); "Page " & pagenum & " of " & pagecount 'format as required
' or put after new page if you want at top of page
Printer.Print: Printer.Print

'Print Column Headers at every page
Printer.CurrentX = 220
Printer.Print LeftAlignText(lstRecords.ColumnHeaders(1).Text, MAX_WIDTH_COL1) & _
LeftAlignText(lstRecords.ColumnHeaders(2).Text, MAX_WIDTH_COL2) & _
RightAlignText(lstRecords.ColumnHeaders(3).Text, MAX_WIDTH_COL3) & _
RightAlignText(lstRecords.ColumnHeaders(4).Text, MAX_WIDTH_COL4) & _
RightAlignText(lstRecords.ColumnHeaders(5).Text, MAX_WIDTH_COL5) & _
RightAlignText(lstRecords.ColumnHeaders(6).Text, MAX_WIDTH_COL6) & _
RightAlignText(lstRecords.ColumnHeaders(7).Text, MAX_WIDTH_COL7) & " " & _
RightAlignText(lstRecords.ColumnHeaders(8).Text, MAX_WIDTH_COL8)
Printer.Print String(MAX_WIDTH_COL1 + MAX_WIDTH_COL2 + MAX_WIDTH_COL3 + MAX_WIDTH_COL4 + MAX_WIDTH_COL5 + MAX_WIDTH_COL6 + MAX_WIDTH_COL7 + MAX_WIDTH_COL8 + 1, "-") ' total 1 spaces in a line

End If

Printer.CurrentX = 220
Printer.Print LeftAlignText(lstRecords.ListItems(i).Text, MAX_WIDTH_COL1) & _
LeftAlignText(strTmpDescArray(j), MAX_WIDTH_COL2) & _
RightAlignText(lstRecords.ListItems(i).ListSubItems(2).Text, MAX_WIDTH_COL3) & _
RightAlignText(lstRecords.ListItems(i).ListSubItems(3).Text, MAX_WIDTH_COL4) & _
RightAlignText(lstRecords.ListItems(i).ListSubItems(4).Text, MAX_WIDTH_COL5) & _
RightAlignText(lstRecords.ListItems(i).ListSubItems(5).Text, MAX_WIDTH_COL6) & _
RightAlignText(lstRecords.ListItems(i).ListSubItems(6).Text, MAX_WIDTH_COL7) & " " & _
RightAlignText(lstRecords.ListItems(i).ListSubItems(7).Text, MAX_WIDTH_COL8)
Else ' print spaces and corresponding line from strArryTmp
Printer.CurrentX = 220
Printer.Print LeftAlignText("", MAX_WIDTH_COL1) & _
LeftAlignText(strTmpDescArray(j), MAX_WIDTH_COL2) & _
LeftAlignText("", MAX_WIDTH_COL3) & _
RightAlignText("", MAX_WIDTH_COL4) & _
RightAlignText("", MAX_WIDTH_COL5) & _
RightAlignText("", MAX_WIDTH_COL6) & _
RightAlignText("", MAX_WIDTH_COL7) & _
RightAlignText("", MAX_WIDTH_COL8)
End If
Next j
Next i
' here is where to check if there is enough space for the 3 lines for the total
' then to print a new header if needed
If Printer.CurrentY > Pagelength - BottomMargin - ThreeLines Then '****
Printer.NewPage
pagenum = pagenum + 1
Printer.CurrentY = TopMargin
Printer.Print Tab(60); "Date Printed: "; Date
Printer.Print Tab(60); "Page " & pagenum & " of " & pagecount 'format as required
' or put after new page if you want at top of page
Printer.Print: Printer.Print
End If

Printer.Print Tab(62); "--------- ---------"
Printer.Print Tab(50); "Total "; RightAlignText(lblTotalSales, 15); RightAlignText(lblNetSales, 10)
Printer.Print Tab(62); "========= ========="
'Printer.EndDoc
'if you want page number on last page, you will need to add the code for it here,
'set the currentY to position at the bottom of page
If pagecount = 0 Then
Printer.KillDoc
'MsgBox "killdoc" '****
Else
Printer.EndDoc
'MsgBox "print" '****
End If
Loop While pagecount = 0
' lstRecords.ListItems.Clear 'Clear first the listview if it contains transaction
' Call ClearFunction(frmSales, "TextBox")
cmdClear.SetFocus
' cmdPrint.Visible = False
Exit Sub
ErrHandler:
If Err = 32755 Then 'Cancel was selected
Exit Sub
' Else
' MsgBox "Please check Printer if properly connected or turned on", _
' vbInformation, ProgName
' Call msgError(Err)
End If
End Sub

Setting Paper Size Of A Report...
Hi

I think this was been addressed in an earlier thread, still, i am placing so that some1 who is very much known can forward me the link please. I have a single page report and i wanted to set the default paper, as we used to set the printing preferences, as A4. How can i do it ?

Thanx for your time.


Gs

Crystal Report Paper Size
Hi,
My Front end is VB6 and Back end is Access 2000. For reporting I am using Crystal Report version 4.6.1.0 (Which originally came with VB6). My question is that while working in Windows 98, I could set the paper size (under printer setup) to any custom paper size of my choice. This same thing cannot be done while working in Windows XP. In XP under printer setup, there is no customised option available. For example if I want to print on a paper with size 6 * 6 inch, it is possible to set the paper size in windows 98, but not possible to set it in XP. Recently I have changed my operating system to XP and this is a very serious problem for me. I am sure there must be a way out since one always expects more features in a newer operating system. Please help.
(Please note that this question is in regard to printing on dot matrix printer. I have tried different printer drivers like Epson FX80, Epson FX1050, Epson LQ1050, etc, but in XP, under printing preferences, the older the drivers, the lesser the options are available, but in no case customised paper size option is available.)

Paper Size In Crystal Report ???
Hello

How to change paper size in Crystal Report ?

When we draw some fields texts, lines, etc. on Cry. Repo., can we copy / paste those things. e.g. I want to draw many lines in a report.

I tried it by Ctrl+C / V but it is not working.

Please Suggest !

Crystal Report Paper Size In Xp
custom paper size on xp
i found how to custom paper size in xp but how to use it in crystal report
i want to set page width=8.5" and height=6.5"

Code:cr.PaperSize=???



Edited by - muchtar on 5/27/2005 8:56:01 AM

How To Set Crystal Report Paper Size Programatically
i tried to setup code to remember report settings (paper size) everytime user want to print a doc
let say user open a doc, and set the paper size to 8.5 x 5 inch
the next time it open , i want the report immediately resized to paper size 8.5 x 5

i try to set paper size of crreport using
crreport.papersize = xx
but it didn't work when i set the papersize out of those defined in the constant crreport.printsize

Paper Size To 1/2 Legal In Cristal Report
how to set cristal report paper size to 1/2 legal and portrait ?
iam using windows xp and printer lx300 and there is no paper size custom



Edited by - muchtar on 5/27/2005 8:57:31 AM

Urgent?can We Defined Size Of Paper In Crysal Report At Runtime
???urgent
can we defined size of paper in crysal report at runtime

Copyright 2005-08 www.BigResource.com, All rights reserved