How Can I Setup Print Page To Half Of A4 Page With Datareport?
I would like to print selling bill ,and the size of page is half of A4 pagesize, How do coding with datareport? Thanks in advance..
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Setup The Page In Datareport Of VB6.0?
i always find difficulties in this problem. how can i resize the page in datareport to fix the size of my data. others tells me that it is on my printer setting to set-up the size of the page. but it is not the goood solution. how can i resize without changing the setting of my printer? It is for DRT(daily time record) that i only cover the 1/2 lenght of the page.
help me find a syntax for this.
Page Setup With DataReport!
Hi all,
I am make some DataReports (Visual Basic 6), but i donnot know how to setup page from Portrait to Landscape. Which properties should i use?
Thanks you very much.
DataReport Page Setup
I have designed my reports in datareports which look fine on my pc and with my printer.
When i run it on another Pc with another printer installed on it ,Reports are not in their orignal setting,shapes, lines and data on the report are not on their place where i have placed it on my Pc with my printer setting.
Can any one tell me, Is there is any way to fix and make generic setting of datareport pages whcih do not shake any item on datareport on any PC with any Printer.
Thanx in advance
-Wasem
(URGENT)Datareport Page Setup In VB6
Hon'ble gurus,
Hon'ble gurus,
I have 2 doubts. I'll be grateful if anybody can advise me.
Q 1.) I am using dataenvironment, datareport and access database where I keep some information about bill nos. When I use datareport1.printreport for one bill no, then it works fine. When I want to print all the bill nos, then each bill is printed in different page. I want that for the second option, all the bills should be printed in one long page without break because I use Dotmatix printer with rolling papers. When printing will be finished then I will cut the paper there. Is there any way for this? Please advise.
Q 2.) Is there any way to set the datareport's page to different sizes like Letter, Legal, A4, Fanfold sizes etc.? If yes, then where to set this.
Thanks in advance.
pkb_pkb
pkb_pkb
Edited by - pkb_pkb on 10/25/2006 6:10:30 AM
Problem With Print, Page Setup, And Print Preview In A Text Editor...
Yes, I have another question.
When I use these exact same functions (with WebBrowser.ExecWB in place of txtScrapbook.Text) in my web browser, it works perfectly. But when I use them in reference to a text box, it doesn't.
Can you tell me where the problem lies, or give me an alternative method? I have a common dialog box already for other functions, so feel free to make use of it if you need to. Thanks.
Code:Private Sub PageSetup_Click()
txtScrapbook.Text OLECMDID_PAGESETUP, OLECMDEXECOPT_DODEFAULT
'opens page setup dialog
End Sub
Private Sub Print_Click()
txtScrapbook.Text OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER
'opens common dialog box prompting user to print current web page/parts of current web page
End Sub
Private Sub PrintPreview_Click()
txtScrapbook.Text OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT
'opens print preview dialog
End Sub
Page Setup In Printer.print
hi nid help on the page setup in printer.? how will i set the printing of text in a landscape paper setup? thanks
Want To Print Only One Record Per Page In Datareport
my requirement is that, there is already a printed
certificate, i should only place my columns' data
in appropriate positions.
can that be achieved in datareports?
how to print only one record per page in datareports?
are there any properties to set?
or it all depends on design? if so, then how to design?
How To Use Datareport To Print Amount In The Last Page ?
Dear All,
The problem is based datareport and vb 6.0 , the question is how to print total price in the last part of the report. for the specia form , I can't put the control lbltotalprice in the report foot section , i just can only put it in the page foot section. in this case, the control lbltotalprice will show every page. I used the .PrintReport false,rptRangeFromTo
Code:
private sub PrintReport()
gCurrentPage = 0
gTotalPages = 1
.PrintReport False, rptRangeFromTo
Do While gCurrentPage > gTotalPages
.PrintReport False, rptRangeFromTo, gCurrentPage, gTotalPages
Loop
end sub
Code:
Private Sub DataReport_AsyncProgress(ByVal JobType As MSDataReportLib.AsyncTypeConstants, ByVal Cookie As Long, ByVal PageCompleted As Long, ByVal TotalPages As Long)
On Error Resume Next
If JobType = rptAsyncPrint Then
gCurrentPage = PageCompleted + 1
gTotalPages = TotalPages
End If
If gCurrentPage <> gTotalPages Then
Me.Sections("sctfoot").Controls("lblTotalT").Visible = False
Me.Sections("sctfoot").Controls("lblTotal").Visible = False
Else
Me.Sections("sctfoot").Controls("lblTotalT").Visible = True
Me.Sections("sctfoot").Controls("lblTotalT").Visible = True
End If
End Sub
but it didn't work, who can help me ?
DataReport(send To Print A Specify Page From A Database)
hello!!!
I have a table from a database with many lines of information, but what i have to do if i want to put in my Report information from 5 line of my table (5th records).Because when i put (DataReport1.ShowReport ), the program show one page from each record of my table. If my table have 10 record, they show me 10 pages to print, and i want just to send to my Report only the information from the last record of table for example.
DataReport1.ShowReport(cod_client) if (cod_client) is the key of the table, this was my idea but this doesn’t work.Give some ideas please.
thanks!!!
Want To Print Only One Record Per Page In Datareport Resolved
my requirement is that, there is already a printed
certificate, i should only place my columns' data
in appropriate positions.
can that be achieved in datareports?
how to print only one record per page in datareports?
are there any properties to set?
or it all depends on design? if so, then how to design?
Edited by - Srikanth Uppala on 11/29/2005 4:18:43 AM
RESOLVED - Can't Get Page Setup Dialog To Show Page Size Correctly
Hey guys and gals, I am hoping someone will have an idea on this one . . .
I am trying to show the page setup dialog and prepopulate the values of the page setup dialog before it is shown. All of the form pre-population seems to work except paper size. I can retrieve paper size just fine after the user clicks ok on the form, I just can't seem to set it before the form is populated.
I created a tiny test app to illustrate my problem.
VB Code:
' on a formOption Explicit Private Sub Command1_Click() With Printer' Height & Width; Printer object — the physical dimensions' of the paper set up for the printing device; not available' at design time. If set at run time, values in these properties' are used instead of the setting of the PaperSize property.' .Width = 14' .Height = 8.5 .PaperSize = vbPRPSLegal .Orientation = vbPRORLandscape End With ShowPageSetupDlg MeEnd Sub '********************************************************************' IN A MODULE! Option Explicit Const CCHDEVICENAME = 32Const CCHFORMNAME = 32Const GMEM_MOVEABLE = &H2Const GMEM_ZEROINIT = &H40Const DM_DUPLEX = &H1000&Const DM_ORIENTATION = &H1&Const PSD_MARGINS = &H2Const PSD_DISABLEPRINTER = &H20Const PSD_INTHOUSANDTHSOFINCHES As Long = &H4Const PSD_DISABLEPAPER As Long = &H200 Private Declare Function PageSetupDlg Lib "comdlg32.dll" _ Alias "PageSetupDlgA" (pPagesetupdlg As PageSetupDlg) As Long Private Declare Sub CopyMemory Lib "kernel32" _ Alias "RtlMoveMemory" _ (hpvDest As Any, _ hpvSource As Any, _ ByVal cbCopy As Long) Private Declare Function GlobalLock Lib "kernel32" _ (ByVal hMem As Long) As Long Private Declare Function GlobalUnlock Lib "kernel32" _ (ByVal hMem As Long) As Long Private Declare Function GlobalAlloc Lib "kernel32" _ (ByVal wFlags As Long, _ ByVal dwBytes As Long) As Long Private Declare Function GlobalFree Lib "kernel32" _ (ByVal hMem As Long) As Long Private Type POINTAPI x As Long Y As LongEnd TypePrivate Type RECT Left As Long Top As Long Right As Long Bottom As LongEnd TypePrivate Type PageSetupDlg lStructSize As Long hwndOwner As Long hDevMode As Long hDevNames As Long flags As Long ptPaperSize As POINTAPI rtMinMargin As RECT rtMargin As RECT hInstance As Long lCustData As Long lpfnPageSetupHook As Long lpfnPagePaintHook As Long lpPageSetupTemplateName As String hPageSetupTemplate As LongEnd TypePrivate Type DEVMODE_TYPE dmDeviceName As String * CCHDEVICENAME dmSpecVersion As Integer dmDriverVersion As Integer dmSize As Integer dmDriverExtra As Integer dmFields As Long dmOrientation As Integer dmPaperSize As Integer dmPaperLength As Integer dmPaperWidth As Integer dmScale As Integer dmCopies As Integer dmDefaultSource As Integer dmPrintQuality As Integer dmColor As Integer dmDuplex As Integer dmYResolution As Integer dmTToption As Integer dmCollate As Integer dmFormName As String * CCHFORMNAME dmUnusedPadding As Integer dmBitsPerPel As Integer dmPelsWidth As Long dmPelsHeight As Long dmDisplayFlags As Long dmDisplayFrequency As LongEnd Type Public Function ShowPageSetupDlg(frm As Form) As Boolean Dim DevMode As DEVMODE_TYPE Dim lpDevMode As Long Dim m_PSD As PageSetupDlg Dim bReturn As Integer On Error Resume Next 'Set the current orientation and duplex setting DevMode.dmDeviceName = Printer.DeviceName DevMode.dmFields = DM_ORIENTATION Or DM_DUPLEX' DevMode.dmPaperWidth = Printer.Width' DevMode.dmPaperLength = Printer.Height DevMode.dmOrientation = Printer.Orientation DevMode.dmPaperSize = Printer.PaperSize DevMode.dmDuplex = Printer.Duplex DevMode.dmSize = Len(DevMode) On Error GoTo 0 'Allocate memory for the initialization hDevMode structure 'and copy the settings gathered above into this memory m_PSD.hDevMode = GlobalAlloc(GMEM_MOVEABLE Or GMEM_ZEROINIT, Len(DevMode)) lpDevMode = GlobalLock(m_PSD.hDevMode) If lpDevMode > 0 Then CopyMemory ByVal lpDevMode, DevMode, Len(DevMode) bReturn = GlobalUnlock(m_PSD.hDevMode) End If With m_PSD .rtMargin.Top = 0.5 * 1000 .rtMargin.Bottom = 0.5 * 1000 .rtMargin.Left = 0.5 * 1000 .rtMargin.Right = 0.5 * 1000 .ptPaperSize.x = 14 * 1000 .ptPaperSize.Y = 8.5 * 1000 .lStructSize = Len(m_PSD) 'Set the structure size .hwndOwner = frm.hWnd 'Set the owner window .hInstance = App.hInstance 'Set the application instance .flags = PSD_MARGINS Or PSD_DISABLEPRINTER Or PSD_INTHOUSANDTHSOFINCHES End With 'Show the pagesetup dialog If PageSetupDlg(m_PSD) Then ShowPageSetupDlg = True' sngMarginTop = (m_PSD.rtMargin.Top) / 1000' sngMarginBottom = (m_PSD.rtMargin.Bottom) / 1000' sngMarginLeft = (m_PSD.rtMargin.Left) / 1000' sngMarginRight = (m_PSD.rtMargin.Right) / 1000' sngPageW = (m_PSD.ptPaperSize.x) / 1000' sngPageH = (m_PSD.ptPaperSize.Y) / 1000 ' Get DEVMODE structure from PRINTDLG lpDevMode = GlobalLock(m_PSD.hDevMode) CopyMemory DevMode, ByVal lpDevMode, Len(DevMode) Call GlobalUnlock(m_PSD.hDevMode) ' Set default printer properties On Error Resume Next If Not (Printer Is Nothing) Then Printer.Copies = DevMode.dmCopies Printer.Orientation = DevMode.dmOrientation Printer.PaperSize = DevMode.dmPaperSize' lPaperSize = DevMode.dmPaperSize Printer.PrintQuality = DevMode.dmPrintQuality End If On Error GoTo 0 End IfEnd Function
Thanks in advance for any insight!
Datareport Print To Specific Printer Or Change Page Size
Sorry for fad English
i have a datareport thats print a ticket (1/4 A4) .
1.- im defined a specific papersize in the printer settings (control pannel) and seting it as default paper
2.- the ticket printing its OK
3.- i need to print too a day report into A4 paper...i receive "report width is larger than the paper width"
4.- im trying to set the papersize before print the dtareport (print.papersize = vbPRPSA4) (dont works)
5.- im trying to send print to another printer (copy) with A4 paper setting as default (dont works)
6.- im triying to show printer dialog to select the oter printer or change the paper settings (datareport.printreport true) (dont works)
PLEASE HELP ME !
** win 2K
** epson lx-300+
To Access Page Setup From ASP Page
I want to print web page programmatically without including header and footer. I can print by calling print function but also would like to access page setup proerties to disable header and footer and then reset back to original proeperties. please let me know ASAP. how can i do that using javascript or vb in asp age
DataReport Page By Page Total
Hi all!
Just an easy question. In my simple list datareport (for example store items) I would like to have a page total field and an incremental page total field for prices... Well, it seems very difficult!!!
Thanks a lot!
Printing A Picturebox Half Way Page
Hi folks,
when i print a image of a picturebox (doc with attached text on it)
it positioned itself slightly away from the side and top of the page.
when i use
<vb>
Printer.PaintPicture Picture1.Image, 0, 0
</vb>
well it doesn't exactly print the page at the corner of the actual paper
is there a way to solve this ?
Word - Loop Through Each Page In Document And Copy Page With Page Format
Here's what i'm trying to accomplish
1 - Start at first page and get page format (portrait/landscape)
2 - Copy page and paste it into a new word document with original format
repeat these steps until all pages have been copied
I need the condition where a document has both portrait and landscape pages.
Anyhelp would be appreciated
Printer Change Page Orientation From Page To Page
I'm running VB 5. Is it possible to change the page orientation from one page to another.
portion of code:
If page_orientation(gridno) = 0 Then
Printer.Orientation = vbPRORPortrait
Else
Printer.Orientation = vbPRORLandscape
End If
If I use "Printer.EndDoc" before the above code, the program works fine. Each page is a separate 'print-job' with the orientation that I want. A problem arises when I want to print to a .PDF printer: each page is saved as a separate PDF because they're all separate 'print jobs'.
If I substitute "Printer.EndDoc" with "Printer.NewPage", I get the error "orientation property cannot be set within a page". Is there any way to get around this?
Err: 'Page Header Plus Page Footer Is Too Large For The Page' With CR9.0
Dear All
I have a trouble making a report using Crystal Report 9.0. I am working on a project which is developed in vb 6.0. What it actually does is, pick some details from the DB (Access 2000) and shows it on the CR 9.0. I've made a TTX File for the same.
But as I run the report it gives an error msg which says Err: 'Page Header plus Page Footer is too large for the page'
To Mention : I am using the custome page size i.e. 6" x 8"..
Can any body help me plz...
Regards,
K****ij
Err: Page Header Plus Page Footer Is Too Large For The Page Using CR9.0
Dear All
I have a trouble making a report using Crystal Report 9.0. I am working on a project which is developed in vb 6.0. What it actually does is, pick some details from the DB (Access 2000) and shows it on the CR 9.0. I've made a TTX File for the same.
But as I run the report it gives an error msg which says Err: 'Page Header plus Page Footer is too large for the page'
To Mention : I am using the custome page size i.e. 6" x 8"..
Can any body help me plz...
Regards,
Kshitij
Page Setup?
Plz tell me how i make page setup without API?
Page Setup
1) I would like to make a page setup(margin, paper size, etc.) for a word processor. Is there a built-in box for this purpose(like .ShowPrinter box) or will I have to do it manually? If manually, then where can i find a good tutorial on it?
2) Is there a way for making Print Preview with all standard features such as zoom in/zoom out ?
Thanks for any help.....
Page Setup
How can I get this to work? Is there just a component I can use?
Page Setup....
How do i change the DEFAULT Printer's Page-Setup via VB code?
anybody?
Thanks!
How We Can Page Setup
haii
My page is 210 X 130 but my printer no custom setup so any print i give A4 paper taking . How i custom paper size. (Epson LQ-300 is my printer) there is no custom setup for this printer.
Please replay me
Join Bytes!
Page Setup
I was wondering, is there was any way to alter Page Setup settings (for Windows 98) with Visual Basic 6?
The reason I'm asking this is because the place I'm programming for uses both Legal and Letter paper and when a Legal size sheet is printed, then the Letter size settings go to default and vice versa.
Any help will be appreciated.
Page Setup
Dear Friends,
I m using Crystal Report for reports. Here i m making a note of report problem:
If i print in Laserjet Printer the report is printing Page Header, Page Footer properly in all pages.
If i try with Dot Matrix and with Continuous sheet, If i print one by one (page by page) then it is ok, but if i give command for more than one pages (continues sheet) then the Page header is not in proper location and going down and down from the second page onwards.
hope one of u can help me to get rid of this problem.
Thanks
Mani
Datareport, Page X Of Y
Hi,
How can I get the page x of y stuff printed in a datareport?
Thanks in advance,
Patrick
Datareport Sum At The End Of Each Page
Dear gurus,
I am using vb6, msaccess2000,datareport1
My problem is I have a long list of Items buying from the market which I show in the Datareport. The list exceeds 5 pages. I want that the items shown in the first page are to be totalled at the end of the first page,the same total is to be shown at the beginning of the 2nd page and the rest of the items, then this total along with the 1st page total at the end of the 2nd page and then again the total of the first 2 pages at the beginning of the 3rd page and the rest of the items and all the total of the 3 pages at the end of the 3rd page and so on.
Precisely, the page total should be shown at the end of the page and this total is to be shown at the beginning of the page.
Is it possible?
please help me. Thank you.
pkb_pkb
pkb_pkb
Page Setup In Word 97
I have a program that loops through a word 97 .doc file. It usually works but every once in a while the data in the file (which is sometimes 3 or 4 pages long) gets treated like one long string..meaning the program makes one loop and hits the EOF. The only solution that i have found, and still don't understand, is to manually set the file's left and right margins to "0", file-->page setup-->margins-->set to "0". I guess this allows the program to see the linefeed or car. return character, which may get truncated if the each line in the file is too long...Im not sure...all that i know is that this solution works...is there any simple way to hard code "0" margins for this document in the programs code..
Excel Page Setup
Hi
My problem is i want to set the FitToTall and FitToWide = 1 and i want want to set the left margin = 0 in the page setup
It runs OK Without any error but when i print it out it comes out in 2 sheets but if i do the above by hand it comes out in 1.
Here is the code
Code:
Dim XL As Excel.Application
Set XL = CreateObject("Excel.Application")
XL.Application.Visible = False
XL.DisplayAlerts = False
XL.Workbooks.Open TempPath
With XL.ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
XL.ActiveSheet.PageSetup.LeftMargin = XL.Application.InchesToPoints(0)
XL.ActiveSheet.PrintOut
XL.Application.Quit
Set XL = Nothing
i got the above code by recording a macro in excel
Any help appriciated
Thanx Shane
Lock Page Setup
Hello everyone,
i have a problem that i can't figure out.
I have to send data to someone in our company who sends it further to others. Problem is he changes the Author.
I locked the file's properties with the workbook protection, but an override, especially for printig, is allowed by the "Custom Header or Forrter".
There this guy puts his name and so on....
Is there a way to lock acces to page setup?
Thanks!
Bianca
Page Setup Option
HI!
I have created a simple program using visual basics 6.0. How do you get the page setup option in the menu bar?
Page Setup With Richtext Box?
Can you format a richtext box to print on different paper sizes eg A4 Portrait etc, in the same way as 'Page Setup' in MS Word?
Page Setup Form With IE5.0
I have this annoying problem related to IE5.0. On a form I insert a webBrowser control. After I call the method: webbrowser.ExecWB OLECMDID_PAGESETUP, OLECMDEXECOPT_DODEFAULT, I intend to find the orientation property which can set in this page setup form. This property is stored in registry in ...SoftwareMicrosoftInternet ExplorerPage setup, but it isn't modified if I switch in page setup form betwen 'Portrait' and 'Landscape'. But somewhere this property is store in registry. Can anyone help me with this problem?
PS. In IE 5.5 if I change orientation from Page setup form , modification is visible at once in registry.
Page Setup And Margins **please Help**
has anyone used any of these Unsupported Controls and Utilities in visual basic 5/6 (im using 5)? but the one that im really wondering about is the Dialog Automation Objects (dlgobjs.dll) which is located on the vb5 cd in this directory oolsUnsupprtDlgobj. but anyway back to the question. what i wanted to know is how to you make the page setup dialog actually setup the margins and stuff, for when i use the print dialog that comes with this .dll.
ok i can get the dialogs to both open up and work kind of i jst dont know how to make the info i setup in the page setup to transfer over the the print dialog? any help would be great. thanks in advanced.
Page Setup (margins...)
I wonder how do i do if i want to show the Page Setup form. There you can
change the margins for your printer page...
Anyone?
Page Setup: Can't Get It To Use The Settings?
We're trying to incorporate Print functionality into a program (trying to print a simple RichTextBox with Bitmaps) and we're having 2 problems. First, here's the code for the PrintDocument_PrintPage Procedure, Print menu item, Page Setup Menu item's:
Code:Private Sub MenuItem_Print_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem_Print.Click
Dim printDialog1 As New PrintDialog()
printDialog1.Document = PrintDocument1
printDialog1.PrinterSettings = PrintDocument1.PrinterSettings
printDialog1.ShowDialog()
If (printDialog1.ShowDialog() = DialogResult.OK) Then
PrintDocument1.Print()
End If
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawString(RichTextBox1.Text, RichTextBox1.Font, Brushes.Blue, 0, 0)
End Sub
Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click
Dim PageSetUp1 As New PageSetupDialog()
PageSetUp1.Document = PrintDocument1
PageSetUp1.ShowDialog()
End Sub
1. Whenever settings are changed in Page Setup (like Margins), these settings are not being passed on to the printed document. Honestly, this is simply lack of understanding on how this code works. The PageSetup1.Document property is correctly reffering to the PrintDocument control, but is there more involved than just that like is some code needed in the PrintDocument_PrintPage procedure?
2. If a picture is in the rich text box that's being printed here, the picture is not being printed. We are lost on this honestly, so we could really use some help.
Thnaks for any assistance you could provide!! Jesus is LORD!!!
PrintForm Page Setup
Good morning people,
I have this problom of wich I am not able to print an entire page.
I have to create an Incoive and the max height of the form that I am able to put is 11520.
That leaves a gap of 3 inches at the bottom of the page.
I would like to be able to print some text there but whatever I do with PrintForm,
it still leaves 3 inches in the bottom of the page.
I don't want to use the Printer.Print methode because I can't put any graphics.
I don't want eather to use a DataReport cuz it's not a report but an Incoice(Facture).
Does somebody has any suggestions ?
Thankz in advance
Page Setup Control Help
Hi,
I need codes to be able to set the page setup without using the showpagesetup. I want to print to an A4 paper that is set to a certain margin where it should be print from left, top, right and bottom position.
Therefore I need some kind of codes that allow me to set the page setup. Mainly I need to adjust the print left and right to a position on the page that it prints to only.
This my code to print to the A4
Code:
' Start a print job to initialize printer object
Printer.ScaleMode = vbInches
'frmMain.dlgBPrint
'Print Send Cert Header
Printer.FontSize = 14
Printer.FontBold = True
Printer.CurrentX = (Printer.ScaleWidth - Printer.TextWidth("Post This Certifcated To")) 2
Printer.CurrentY = 0.8
Printer.Print "Post This Certifcated To";
'draw box
'draw top across
Printer.Line (2.6, 0.8)-(5.7, 0.8)
'Draw down
Printer.Line Step(0, 0)-Step(0, 0.3)
'draw bottom across
Printer.Line Step(0, 0)-Step(-3.1, 0)
'draw up
Printer.Line Step(0, 0)-Step(0, -0.3)
'Print Send Cdfsaf dfasdfds dfsdaf dsfsd fsdaf sdf, smith ad 343.
Printer.FontSize = 12
Printer.FontBold = False
Printer.CurrentX = 3.4
Printer.CurrentY = 1.2
Printer.Print "df dfasdf fddf adf ";
Printer.CurrentX = 3.5
Printer.CurrentY = 1.4
Printer.Print "sf dfd dfdsfdd dfasdf dfasdf";
Printer.CurrentX = 3.3
Printer.CurrentY = 1.6
Printer.Print "Stepney erdf dfasdfsadfdsfdsfdsf";
'Print Product Info Header
Printer.FontSize = 14
Printer.FontBold = True
Printer.CurrentX = (Printer.ScaleWidth - Printer.TextWidth("Product Information")) 2
Printer.CurrentY = 2.2
Printer.Print "Product Information";
'draw box
'draw top across
Printer.Line (2.6, 2.2)-(5, 2.2)
'Draw down
Printer.Line Step(0, 0)-Step(0, 0.3)
'draw bottom across
Printer.Line Step(0, 0)-Step(-2.4, 0)
'draw up
Printer.Line Step(0, 0)-Step(0, -0.3)
Printer.FontSize = 12
Printer.FontBold = False
'Print Product Name
Printer.CurrentX = 1
Printer.CurrentY = 3
Printer.Print "Type of Label: " & iniRead(strProductName, "frmLabels.lblTitle.Caption", strPictureLabelsPath & "Labels.ini");
'Print Step 1 (Quantity/Price)
Printer.CurrentX = 1
Printer.CurrentY = 3.4
Printer.Print "Step 1 (Quantity/Price): " & strStep(1);
'Print Step 2 (Label Text)
Printer.CurrentX = 1
Printer.CurrentY = 4.2
Printer.Print "Step 2 (Label Text): " & strStep(2);
'Print Step 3 (Lettering Style)
Printer.CurrentX = 4
Printer.CurrentY = 4.2
Printer.Print "Step 3 (Lettering Style): " & strStep(3);
'Print Step 4 (Label Colors)
Printer.CurrentX = 1
Printer.CurrentY = 4.6
Printer.Print "Step 4 (Label Colors): " & strStep(4);
'Print Step 6 (Label Pictures)
Printer.CurrentX = 1
Printer.CurrentY = 5
Printer.Print "Step 6 (Label Pictures): " & strStep(6);
'Print Step 7 (Delivery Address)
Printer.CurrentX = 1
Printer.CurrentY = 5.4
Printer.Print "Delivery Address" & strStep(7);
'Print Date
Printer.CurrentX = 2
Printer.CurrentY = 7
Printer.Print Format(Now, "long date");
'clear global variable
strBack = ""
strProductName = ""
For i = 0 To 20
strStep(i) = ""
Next i
Printer.EndDoc
at the moment when it print it a string it will not print all of the string becuase the string is to long, it prints that string till end of of width page size.
Datareport Page Breaks
I have a msaccess database that contains some info that i print out using the datareport. When I print i have all my info in ascending order via the last name of the people. Is there a way to break the page after each new letter?
Example
apple
ape
-----page break--
banna
box
-----page break
cart
car
and so on..
Page Number On A Datareport
ok, I have a new question.
I want a label to be visible, if the report is on page two and so on.
But I am not sure on how to grab a page number from my report.
Thank you for you help.
he9ap00
Can You Set Max Records In Datareport Per Page
hi,
In Datareport,can we set max records in detail section per page?.
see the problems is,assume the recordset has 20 records i supposed to print only first 8 records in detail section per page and remaining 8 records should get print in next page and remaining 4 records should be in last page.
The following code gets print correctly but its print 8 records +10 line empty spaces in the first page
and 8 records +10 line empty records spaces and 4 records + 10 line empty records in remaining pages.I don't wan't these empty spaces.
Code:
Set rs = Nothing
rs.CursorLocation = adUseClient
sql = "select slno,productdesc,qty,rate,amount from billgen order by slno"
rs.Open sql, cn, adOpenDynamic, adLockOptimistic
If rs.EOF = True And rs.BOF = True Then
MsgBox "No records selected", vbInformation
Else
cnt = rs.RecordCount 'Logic to count number of pages to be print
cnt1 = cnt / 8
If Fix(cnt / 8) < cnt1 Then
cnt1 = cnt1 + 1
cnt1 = Fix(cnt1)
End If
End If
rec = 8
stat = 1
Dim new_report As New rpt_counter
While i <= cnt1
Set new_report = Nothing
Set rs = Nothing
rs.CursorLocation = adUseClient
sql = "select slno,productdesc,qty,rate,amount from billgen where slno >= " & stat & " and slno <= " & rec & " order by slno"
rs.Open sql, cn, adOpenDynamic, adLockOptimistic
new_report.Sections("section1").Controls("rtxt_slno").DataField = rs.Fields("slno").Name
new_report.Sections("section1").Controls("rtxt_productdesc").DataField = rs.Fields("productdesc").Name
new_report.Sections("section1").Controls("rtxt_qty").DataField = rs.Fields("qty").Name
new_report.Sections("section1").Controls("rtxt_rate").DataField = rs.Fields("rate").Name
new_report.Sections("section1").Controls("rtxt_amount").DataField = rs.Fields("amount").Name
Set new_report.DataSource = rs
new_report.Show
stat = rec + 1
rec = rec + 8
i = i + 1
Wend
Output:
see the total records 5
First page:
P.M.J Traders
55,North Car Street,Dindigul-624 001.Ph:2429193
TNGST :- 5200992 Date: 25/5/2003
Bill No 123 Name :- Habil
Sl.no Products Description qty Rate Amount|
1 Allcapes Putty _White_1_Kg 1 70.01 70.01
2 Ex100_White _10_Lt 1 1,964.57 1,964.57
3 ExEver_Plaqtinum Grey _10_Lt 1 2,408.86 2,408.86
4 Ex100_Ox.Blue _1_Lt 1 208.37 208.37
5 Ex100_White _20_Lt 1 3,85
i don't want these speaces }
}
------------------------------------------------------------------------------------------
tail piece:
i don't want these speace b'coz counter bill will not print in A4 size paper. Paper width can have maximum 8 records
Datareport Page Header
hi guys! i just wanna ask how to set the datareport page headers label's caption at run time? i have ask this problem before but i did not got a correct way.
Datareport Page Header
hi guys! is there any possible way of changing labels caption at run time that is located at page header of the datareport? what i want is to set my labels caption at runtime and it depends on the text in combobox...
Caption In DataReport Last Page
i have 5 pages to print in vb6 using datareport;
kindly help me to put this at the last page of my data report?
Code:
DataReport1.Section(5).Controls("LastText").caption = "End of Page.. Thanks for using"
Multi Page Datareport!
Hi,
I have many fields in a database which does not fit in a single page. How can I generate a report of more than 1 page in using datareport. I mean half of the fields data will display in page 1 and rest fields data in page 2.
Any help plssssssss?
Thanks
DataReport - Muli Page.
Morning All,
I am contemplating using DataReport (with associated DataEnviron), however, with the limited testing I have done,
is it possible to have the report span 2 pages (in ladscape).
Info:
The data I want to display (and print) has too many fields to fit on one page (its a Logbook) so I need the fields to cover 2 pages
(of course there may be many (sets of) pages).
Ultimatley I need page 1 and 2, then new data on page 3 and 4, then new data on page 5 and 6 etc.....
As an alternate, I can set this up in Excel if required. Excel also has the ability to set the order of print - ie left to right then down, or top to botton then over to
right, top to bottom.
Sounds confussing
Cheers,
Bruce.
Page Breaks In DataReport
Ok, this is just wierd... I have pretty detailed report that needs to be broken into a different page per record. Well, I if I set the detail section of my datareport to pagebreakafter, It doesn't show me any pages beyond the first one when I show the report. However, if i take the page break out, it will list all of the data for all of the reports...
Is there any special way to navigate through the different report pages, or a different way to show the report?
Thanx,
Squirrelly1
Page Size Of Datareport
I am trying to find any solution for sizing Datareport using 'Search the forums: '. but I can not find any solution. How can I configure Page size of Datareport.
Thanks
|