Printing Invoice Type Reports In VB
Hi
I have written an order-processing system using VB for an interface and Access as the data store. I am now trying to construct invoices so that the system can print out invoices once orders have been placed, displaying the relevant customer, product information etc.
I'm not sure where to start, but know I've probably got to use a data report somehow, but I'm not sure exactly how to use them?
TIA
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Invoice Printing
I need to be able to generate an invoice from records in an Access db and then be able to see that invoice before printing and then print it to the printer. I would like to know what you recommend I should use in the generation of such an invoice. Please advise.
Printing An Invoice
I have to make up an invoice that a customer can print out from my vb app. I've printed out simple stuff in the past, but I've never tried to create a full 8.5 x 11 page invoice. Are there other techniques for creating these type of pages aside from simple printing tasks that I should be aware of and does anyone know of good tutorials addressing these types of printing tasks? I'm wondering if I should just send a formatted string to the printer to print or set up an invisible form that will be printed or what? Any tips would be appreciated. Thanks.
Invoice Printing
I am making Invoice in Datareport. Want to keep position of the page footer in Last page footer. If Invoice is of 15 Items & 10 items are printed on a page, then Invoice becomes of two pages. Total Items, Invoice value I can derive in report footer, but report footer has to appear in Last page footer. Please help.
Thanks
Prashant
Printing A Certain Invoice
hey,
i would like to know how to print a certain invoice by pressing a button in the invoice form.
i have created a dataenvironment with an sql as
SELECT * From job WHERE jobID= " & job.txtJobID.text & ";
where job is the form which is open and has a value in the txtJobID.text as an integer
but it is not working it is displaying an error message as invalid criteria
because if i print the invoice table then it prints all the invoices in the database, but i want a single one.
please help meeeeeeeee.
Invoice Printing
Hi All,
I am trying to print out invoice on hard coded
paper.
Thsose information getitng from database and want
to write in few places.
Like Address, amount , invoice numbers...
how could I point in specific places....
would u plese help me out..
thanks in advance
Ananthan
Printing Invoice Form
I want to print an invoice on blank paper and need an efficient method of printing the form with lines, shading and a small logo. Printing a page-size jpeg takes too long on some slow high-res printers. Is there a better way? I experimented with a wmf drawn in Corel but the output didn't look exactly like what I drew. Some line thicknesses were different. Any suggestions? The text is printed with TextOut. Thanks.
Printing An Invoice System
I want to create an invoice system, where i can enter, client name, the date some details, address etc in textboxes then press a print button, that prints the text in all the texboxes and aligns them as i wish.
How come this doesnt work:
VB Code:
Private Sub Command1_Click()Dim s As Strings = Text1.TextPrinter.Print sPrinter.EndDoc End Sub
And if this is correct how do i get it to print the contents of all the textboxes on the page and aligh them on the page
Thanks
Alex
PS The computer i am writing the program on has no printer. What will happen when i text it without a printer???
Thanks
Alex
Printing Richtextbox On Invoice
Is it possible to print richtextbox on the same form with non rtf data, such as at the bottom of an invoice or statement?
If so, how in the world is it done?
Thanks!
Printing An Invoice Using Vb6 And Access
Hi,
How can I design & print an invoice with it's contents based on two different Access 2000 tables. Also it has some fields which the user will type before printing (e.g. 'Purchase Order No.', 'Boxes' etc.).
Any help will be appreciated.
Fareez...
Printing Invoice On Small Printer
Can this be done on VB? I want to print an invoice on a small printer (Like at the cash counter of market).
If someone has a code that would be great. I can either use CR or print thru VB.
The application is using MDB as a database.
Thanks in advance
Problem Printing Small Invoice With Dot Matrix Printer
I am a Programmer, currently on look out for a job, just joined with a company and they put me one month trial. I will have to clear out this problem in order to keep me permanent.
Currently I'm developing a Point of Sales application. I have a problem when printing the invoice using the Epson FX-890 dot matrix printer. I need to print the invoice just 1/2 of letter size length or specific size. So I need the printer stop scrolling when it reaches the last line of the invoice right at the 1/2 of a letter size length.
The printer should forward the Invoice to the proper Tear off point.
But my problem, the printer always scroll to a next page or paper. I'm using the printer object of VB or using the MSWord object but it did the same thing. I have already tried all the properties setting, but it doesn't work.
Any comment or help would be much appreciated.
It's very urgent. Please help me out
Crystal Reports - The Specified Value Type Is Different From The Current Value Type.
Name: hanson
E-Mail: hanson@i-next.net
Subject: Crystal Reports - The specified value type is different from the specified value type. HELP URGENT!!!
Body of Message:
I created a stored procedure in MSAccess. I set two parameters - DateFrom and DateTo with Date/Time data type since MSAccess doesn't have a Date datatype.
I create my Crystal Reports (ver.8.5) from this stored procedure. When I run my VB6 app and send the following code to Crystal Reports:
CrystalReport1.StoredProcParam(0) = #1/1/2001#
CrystalReport1.StoredProcParam(1) = #1/31/2001#
CrystalReport1.Action = 1
I get an error saying:
"The specified value type is different from the current value type."
When I went back to Crystal Reports in its Field Explorer Window, I noticed that the value type specified for both DateFrom and DateTo is Date/Time. Good thing is that Crystal Reports provides a Date value type. The problem is that the value type of these two parameters can't be changed (edited). Worse, it can't be deleted.
If I try passing values like:
CrystalReport1.StoredProcParam(0) = "1/1/2001 0:00:00"
CrystalReport1.StoredProcParam(1) = "1/31/2001 23:59:59"
CrystalReport1.Action = 1
It won't work.
Neither will:
CrystalReport1.StoredProcParam(0) = "#1/1/2001 0:00:00#"
CrystalReport1.StoredProcParam(1) = "#1/31/2001 23:59:59#"
CrystalReport1.Action = 1
Nor:
CrystalReport1.StoredProcParam(0) = "'1/1/2001 0:00:00'"
CrystalReport1.StoredProcParam(1) = "'1/31/2001 23:59:59'"
CrystalReport1.Action = 1
How can I go about this? I can create new parameter fields but I can't delete the original two which will be useless. I'm stuck with these two parameter fields and there is no other way to go about this but to deal with these two.
Please help, thanks.
Hanson
hanson@i-next.net
Added on Date: 03:59:37 03/27/01
Crystal Reports, Printing Data Reports
how do you filter records in Crystal Reports using a variable? I'm using Crystal Reports ver. 4.6.1 Why does a time field shown as mm/dd/yy when it should be hh:mm? Is there an easy way to print data reports with filtering or conditions in vb?
Printing Reports From VB 6 Using Crystal Reports
I have delveloped an application for invoice generation and printing.
I have 2 tables(MS ACCESS), first will store invoice details and the second will store item details of invoice like serial no, description, qty, rate and value.
for a given invoice there will be 4-5 items.
In the crystal report(ver 7), I have linked first table containing invoice details with the second table containing invoice item details.
The item details are printed in the detail structure part of crystal report.
The problem is when I print the report, the report generates individual invoice for each item rather than one invoice for all the items.
I wish someone could rectify this error and enable me to implement the software
Regards
NSNRao
Which Type Of Dll And OCX Of Crystal Reports Are Required
Which Type of .Dll and .OCX of Crystal Report 8.0 are required when iam going to make installer of my VB 6 project.
i have the problem when i install my project every thing is working except Crystal Report the message occured "Physical Data Not Found"
please helpme Out sir !
i made installer in "Project and Deployment " and Installsheild Developer 8.0
Printing Reports From VB
I have 10 rows X 10 columns wide and 6 digits long of numerical data. What is the easiest application to send the data to and print a pleasing report from my vb app as a simply button (1 click and the printer is printing the data).
Printing Reports
how to print two or more independent reports on the same page without classifying any of the reports as a subreport of any other.
Printing Reports
I'm wondering how to print out a report using something other than PrintForm. I'm rather new to this, but I've noticed the PrintForm will basically do a screenshot of the form and it may or may not fit on the paper, depending on how big the form is. I was considering just saving the text of the various textboxes to a file and then printing that, but thought there was probably a better way to do this. I don’t want to use crystal reports, because the user need it on their machine. Any advice would be appreciated. Thanks.
Printing Reports
I am printing a report and it looks great... except I've run into one problem. When I have dollar amounts that vary (for example... 34.24, 120.35...) then on my report it's aligned to the left instead of the right like so:
34.24
120.35
but I want it so that the decimals line up. I tried the format() function, but I couldn't get it like I wanted it... is there an easier way than having to use a bunch of if statements for each decimal space?
I would much appreciate it. Thanks in advance!
Printing Reports Using VB6
Hi,
I am currently trying to finish my assignment for college. I have to create a VB6 application using ADO to front an MS Access database. It is a based on a group of solicitors , and i have to allow add,delete edit records ect.
I have almost finished the assignment, but one of the main things we need to beable to do is to print Reports from an SQL query. i.e "All Solicitor Details Grouped by Grade".
The problem i am having is i just cannot for the life of me, get the report to print out neatly. the 1st few records come out neatly, but then it goes wonky, and whatever i try, just does not work.
Could somebody please help me as this is the last thing i need to do to finish the assignment, and i am really struggling.
Code:
Private Sub cmdPrintReport_Click()
On Error Resume Next
sqlReport = "SELECT * FROM SolicitorQuery"
Set rs1 = cn1.Execute(sqlReport)
' Printer Headers
rs1.MoveFirst
While Not rs1.EOF
Printer.FontBold = True ' makes font bold
Printer.FontSize = 18 ' sets the font size for the headers
pline = String(62, " ")
Mid(pline, 27, 35) = "Solicitor Details in order of Grade"
Printer.Print pline
Printer.FontSize = 12
Printer.FontBold = False
pline = String(121, "*")
Printer.Print pline
Printer.Print ""
pline = String(121, " ")
Mid$(pline, 12, 12) = "Solicitor ID"
Mid$(pline, 35, 5) = "Title"
Mid$(pline, 50, 7) = "Surname"
Mid$(pline, 66, 8) = "Initials"
Mid$(pline, 81, 5) = "Grade"
Mid$(pline, 93, 7) = "Partner"
Mid$(pline, 107, 11) = "Description"
Printer.Print pline
Printer.Print ""
pline = String(150, ".")
Printer.Print pline
'Print Data
While Not rs1.EOF
Printer.Print ""
pline = String(140, " ")
Mid$(pline, 12, 5) = rs1!Solicitor_ID
Mid$(pline, 38, 7) = rs1!Title
Mid$(pline, 55, 20) = rs1!Surname
Mid$(pline, 78, 7) = rs1!Initials
Mid$(pline, 92, 5) = rs1!Grade
Mid$(pline, 103, 8) = rs1!Partner
Mid$(pline, 115, 19) = rs1!Description
Printer.Print pline
rs1.MoveNext
Wend
Wend
Printer.EndDoc
End Sub
Printing Reports
I am trying to create Print Reports and am finding the Data Report Designer in VB6 very basic (please excuse the pun), I am even struggling to throw a page when I want to. Can anyone please recommend an alternative that allows for relatively complicated print formats? Is Crystal Reports the best alternative?
Printing Reports?
I have to print out a simple report, but what I have been trying to far isn't quite working.
I need it to do something like this. Of course I've simplified the hell out of it here to explain my problem.
NAME: Johnny Paycheck ADDRESS: 78 Oh Yeah St
The trouble here is that I need NAME & ADDRESS printed in bold, but the rest in regular font.
In the vb program I've allowed the user to select their own fonts and font sizes, but if I write this to a simple .txt file it of course won't format the fonts for me.
If I use the "Printer.print" statement, it works like a charm, but I can't figure out how to change between bold and regular whilest being on the same line.
Basically, I either need someone to tell me if there's a way to print different fonts on one line using "Printer.print" or I need a suggestion on how to accomplish this task.
Really all I need help with is how the hell to print a single line with different fonts or sizes and so on.
Thanks everyone!
P.S. I'm trying to keep this simple, so please don't respond with 4 pages of API calls or even 4 pages of code. There is an easy way to do this. I just can't find it....haha
Printing Reports
I want to print a report designed in Crystal.
I have the crystal report object placed on the form and in properties i have specified I want to send it to Print.
I then have the following to print the report
report.PrintReport
I have 2 queries:
1. Can I allow the user to choose which printer to print to rather that the default printer.
2. Sometimes, I don't know why, the report prints and sometimes it doesn't. Why?
Thanks,
Printing With Reports
I have an Access 2000 db file. I want to print it like a calander. How do I use reports to get the data to print with a specified template?
Printing Reports
Hello
I hope somebody can help me.
I have a text file report that I created in VB .When it reaches 55 records it has to have a new header it does all that.
But when a user prints it out it has to start on a new page every time it hits 55 records as well .I also have to insert a form feed character chr(13) so when its printing it would print on a new page.Can somebody please help.I hope I was clear enough
Printing Reports Out
Hola Amigos:
This is my first crack at any VB so bear with my horrid newbie questions. First let me give my issue: I want to print a report out, landscape style one a page. This report will be multiple pages (roughly 20). The report is will have about 10 colums of numerical data with a label at the top.
What I have done is created a hidden form with a header on it and dynamcially fill about 150 text boxes with my calculations based on ranges of values. This method works great but i'm using frmFormName.Printform to print which is horridly slow for 20 pages and each page comes up to 900kb which is killing smaller non laser printers!!!!
I really need a better or a new method on how to fix this!
Thanks
Vb6.0 Printing Reports
I'm writing a program which allows you to make invoices. I have a problem cause i can't print the acces report. It's a report that is made in acces 2000. How can i acces the report using the program?
Mail me if you can
thx
Printing Reports Thru Vb
I have connected to Access and have all the data ready, Now I want to print datewise reports giving total for the period chosen.
Currently at run time I store all this data in array. since I have yrly files, have written the routine to take care of date range & the year specific file to be opened and the data within the date range is stored in array which is currently multidim (1000,5). Now i want to print out a report of the same. Logically I need to store this in a database and then run the report writer utility....How ?????
Printing Reports In VB???
hi there,
i have got a problem.
i'm to print a report not from a database source but from directly textboxes and combo boxes inside a Form.there are more then 300 text/combo boxes arranged on sstab control on a form. they are managed under different categories i.e. 10 inputs are under one category, 15 are under another category, 5 are under another category etc.
user can input any of the text boxes and only those textboxes that r not empty are going to print along with the categoey name as heading.
i tried to use crystal reports and data report but they can be only used with a db source. so can u tell me a smart solution??? i can use the printer object but i think it will take a lot of code to format the output.
thanx
CJ
Printing Reports
I have a project that I am having trouble with. On the Print menu, I have a
command to print an entire report, and another command to print only those
records in the sequential access file that are selected in the list box.
The data I enter into the program is going to the sequential access file,
but I cannot get either report to print. Does anyone know the code I can
use to get these reports to print? I also need the report to print a
statement that shows the total number of records printed. I am beginning to
hate Visual Basic and don't know why schools even teach it any more.
Printing Reports
I am having trouble printing reports within VB. First of all I create a data environment and then create a report. I then do a search from the database and drag over the client details. I fill a tempory database with relevant info from that database and then fill the report and then print it. Is this the way to do it or have I got it all wrong? Is there a set way to do this?
Please help
Printing Reports Need Help
Hey all, Ive been using VB for about 6 months and IM finally to the point where Ive created a porgram where i need to print off a report.
Heres some background info. I have a form called frmViewCommissionsDue. What this form does is query's and Access 2000 DB for all Commissions that havent been paid yet and need to be paid. I connect to the db using DAO. It populates a list box (lstComm) with the Following Information. SalesNo, Employee Name, Commission Amount. I have the Information tabbed and looking neet in the list box. Now what i need to do is print out all the information that is listed in the List Box. These Print outs will be given to each employee for their own records to keep track of which commissions they have been paid for.
Now my main question is How should i go about printing this information out so it looks professional. I know there is print functions and what not, but those arent very neat. If anyone could help me or point me in the right direction on how i should go about printing the reports out so they look respectable, Id really appreciate it. Im using VB 6.0 Enterprise Edition. (Also what is this Crystal Reports ive been hearing about?)
THanks for help
-Justin
Printing Reports
Hi Gurus,
I am using visual basic 6 with Crystal reports 8.5. when printing crystal report it is slow compare to the dos system. is there any technique to print faster with crystal reports.
thank you in advance
dinesh
PPT VBA - Printing Another File Type
I have some options buttons in my PPT presentation where you can select files that you want to print and then you click the Print button and the selected file will print. The trouble is the files that they can print are pdf files and I only knew how to set it up to print ppt files. How can I use VBA to print PDF files from my PowerPoint presentation?
Thanks!
Printing 2 Sided Reports
I am in need of some help with a little codeing in VB for excel. I only have limited VB experience but can usually plow through it. The program was not originaly created by me so I still fumble through some of it.
I am trying to get Excel to print a variable number of pages (dependant on a variable in one of the cells per page) but instead of cycling through each one and printing it seperately I need it to print it as 1 print job so I can set it to print the document as 2 sided.
Originaly the macro was set to print this way:
Sheets("weekly").Select
Range("J5").Select
If RetVal2 > 0 Then
Sheets("Rpt 2").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
Sheets("weekly").Select
Range("J6").Select
If RetVal3 > 0 Then
Sheets("Rpt 3").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
I tried puting it in an array to print it all at once, and I dont know if I am making a simple VB error or what the problem is (Im more used to C++).
If RetVal2 > 0 Then
Counter = Counter + 1
RetValArr(Counter) = "Rpt 2"
End If
If RetVal3 > 0 Then
Counter = Counter + 1
RetValArr(Counter) = "Rpt 3"
End If
......
Sheets(RetValArr()).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Im getting an error on Sheets(RetValArr()).Select and i cant find a way to print a range like Sheets(RetValArr(1:Counter)).Select or something like that.
Any help/advice would be greatly appreciated
Sparky
Printing Crystal Reports From VB 6.0
I am currently working on program in visual basisc 6.0. and I want to print some already created crystal reports from within vb. However, I don't want that when I select the print command button the report opens up to be displayed. I would like for it just to be printed. I have tried the object.printReport code but it does not work at all. I am using the following code:
CrystalReport1.ReportSource = crptReport
CrystalReport1.ReportFileName = "C:Program FilesVacationLeave.rpt"
CrystalReport1.Destination = crptToPrinter
CrystalReport1.Action = 1
When this code is executed I get an error stating "Unable to load Report."
Does anyone have an idea how I can do this? I response will be greatly appreciated.
Nisean
Printing Sales Reports
i know i am being really pushy on this but i got this project due tomarrow and would like anyhelp you guys can hook me up with here!
Printing Reports
Thats what i need to do
Problem: I cannot get the colums to line up to save my life using vbtab. my teach talked about using tab(#) to tab so many spaces but i cannot use more then one in a line of code, and it can only be at the begining so i used vb tabs and did it this way:
Code:
Private Sub mnuOrderReport_Click()
Dim Counter As Integer
Dim strFname As String
Dim strLname As String
Dim intPayMethod As Integer
Dim strCardCode As String
Dim strNumCard As String
Dim strAddress As String
Dim strCity As String
Dim strState As String
Dim strZipCode As String
Dim intItems As Integer
Dim intQuanItem As Integer
Dim strProdId As String
Dim curUnitPri As Currency
Dim curTotalPri As Currency
Dim curItemTot As Currency
Const strHeaderOne As String = "Phrank & Schtein's Apothecary"
Const strHeaderTwo As String = "Order Report For"
Const conItem As String = "Item #"
Const conProduct As String = "Product ID"
Const conQuant As String = "Quantity"
Const conUPrice As String = "Unit Price"
Const conTotal As String = "Total Price"
Const conTitle As String = "Item #" & vbTab & "Product ID" & vbTab & vbTab & vbTab & vbTab & "Quantity" & vbTab & "Unit Price" & vbTab & "Total Price"
TodaysDate = Date
Printer.FontSize = 14
Printer.FontName = simsun
Printer.Print Spc(31); strHeaderOne
Printer.Print Spc(38); strHeaderTwo
Printer.Print Spc(41); TodaysDate & vbNewLine
Open "a:p&sordrs.dat" For Input As 2
Open "a:p&scstmr.dat" For Input As 1
Do While Not EOF(1)
Input #1, strFname, strLname, intPayMethod, strCardCode, strNumCard, strAddress, strCity, strState, strZipCode, intItems
Printer.Print strFname & " " & strLname
Printer.Print strAddress
Printer.Print strCity & ", " & strState & " " & strZipCode & vbNewLine
Printer.Print conTitle
Printer.Print String(104, "*")
For Counter = conOne To intItems
Input #2, intQuanItem, strProdId, curUnitPri
curItemTot = curUnitPri * intQuanItem
curTotalPri = curTotalPri + curItemTot
Printer.Print Counter & vbTab & strProdId & vbTab & vbTab & vbTab & vbTab & intQuanItem & vbTab & vbTab & Format(curUnitPri, "currency") & vbTab & vbTab & Format(curItemTot, "currency")
curItemTot = conZero
Next Counter
Printer.Print String(104, "*")
Printer.Print vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & Format(curTotalPri, "currency")
curTotalPri = conZero
Loop
Close #1
Close #2
Printer.EndDoc
End Sub
this unfortunatly sucks and i know was very stupid to do but it got the job done and looked well..... intill i saw that some product numbers when printer were different sized letter widths, it still contained 6 charactors but the width was way jacked. i can''t figure out how to set a static width other then
Code:
printer.width
but how is that gonna work with the fonts? and how about the tab([int]) and spc([int]) functions, how in the hell do those work?, If some one could get me to print this thing right and figure this cool stuff out, you would just rock, if more then one of you hook me up You all rock man! Please someone help me!
Printing Columned Reports
Well I am having a problem with the column printing... Supposed to be 4 columns... And it will only print one side or I can change the code up a little and make it print all the same numbers.. Any help would be appriecatied....
Code:
For psngTime = psngMinimum To psngMaximum Step psngIncrement
psngLastY = Printer.CurrentY
psngLastX = Printer.CurrentX
If psngLastY >= 10 And psngLastX >= 8.5 Then
Printer.NewPage
PrintPageTitle
psngLastY = Printer.CurrentY
End If
Call PrintSngField(psngTime, csngCol1, psngLastY)
psngTax = psngTime * psngRate
Call PrintSngField(psngTax, csngCol2, psngLastY)
psngTax = psngTime * psngRate
Next
Call PrintSngField(psngTime, csngCol3, psngLastY)
psngTax = psngTime * psngRate
Call PrintSngField(psngTax, csngCol4, psngLastY)
psngTax = psngTime * psngRate
Printer.EndDoc
Making/Printing Reports
I'm sure this has been answered quite a few times, but I couldn't really find anything...
At work, every night, we do summary reports in excel and it is all a real pain to have to do 5 or 6 different files, so I just wanted to make a small vb program to do it for us.
There are several different fields that are being filled in, and then printed.
My question is, how would I get VB to pickup certain text boxes, and print them in a report type of thing, either one report at a time, or all at once?
Thanks in advance.
-Justin
Printing Access Reports
Here's my situation:
I am extracting information from two separate text files, storing the information permanently in an Access database and comparing them against one another on a periodic basis (i.e. quarterly, semi-annually, etc.) I have the extractions working fine in either Access or with a VB app the problem comes when I try to do reporting. I have designed the reports I want in Access but can't find a way to print them without opening Access. I thought there might be a way to do this because you can link Access tables etc. to a VB app.
Is there a way to print reports from a VB app without opening the Access application?
If it is not possible is there a way to include common dialog boxes/controls in a purely Access application so my end users can choose the files they want to import?
If anyone has any other suggestions I'd love to hear them.
rp
Printing Access Reports
I have a dedicated Computer that automatically prints Reports on a daily basis. This computer's print configuration is setup to print in Landscape and double-sided. My problem is I have to automatically setup up another report to print but I need it to print on one-side only. Is there a way to setup this for just this report? Then continue back to double-sided printing.
Thanks in advance!
Harley
Crystal Reports Printing
Hi,
I am writing a vb interface to allow the users to select a report from a file list box and then print it.
The problem I seem to have at the moment is the fact that the reports do not print out, either through some vb code or the crystal reports viewer print button. I get the printer dialog box up and click "OK" but then nothing happens.
CODE:
Dim application As New CRAXDRT.application
Dim Report As CRAXDRT.Report
Dim selectedreport As String
selectedreport = File1.Path & "" & File1
Set Report = application.OpenReport(selectedreport)
frmrptviewer.CRViewer91.ReportSource = Report
frmrptviewer.CRViewer91.ViewReport
Report.PrintOut True, 1, False, 1, 1
Does anyone have ideas?????
Slim
Printing Multiple Reports
how to print the output of more than one independent reports in visual basic or Microsoft access on the same page without classifying any of the reports as a subreport of any other report.
Printing Reports (tricky)
Tricky? i hear you laugh, but yes, tis true.
I'm trying to print an Access 2000 report using the following code:
Dim x As access.Application
Dim strDB As String
Dim strReportName As String
Set x = New access.Application
strDB = "c:msfortracker.mdb"
x.OpenCurrentDatabase (strDB)
strReportName = "exam-sub form"
x.DoCmd.OpenForm (strReportName)
The paths and names are all correct. The report expects no additional paramaters. But when run it comes up with:
Runtime error 2498 - An expression you entered is the wrong data type for one of the arguments.
And stops on the line specifying the line calling to open the report. I;m stumped. Help. Please!
Regz
B8Man
Crystal Reports V9 Printing....
Based on certain criteria, I need to either print one or two pages.
Ex:
Code:
If rs1("AEIOU") = Trim(UCase("y")) Then
Report = "TEST.rpt"
Report01 = "P2_TEST.rpt"
PrintView
Else
Report = "TEST.rpt"
PrintView
End If
How would I do this? Thanks...
PrintView looks similar to this...
Code:
Public Sub PrintView()
Set CRReport = crApp.OpenReport(ReportPath & Report)
CRReport.ReadRecords
'other stuff
End Sub
Crystal Reports Printing
This is the first time I used the crystal reports 8.5 viewer object, I see it has a print button on it, I looks great and all, but now how do you get it to actually print the report. Here is my code for opening the report.
Code:
CRViewer1.EnableGroupTree = False
CRViewer1.Visible = True
Me.MousePointer = vbHourglass
Set report = cRepApp.OpenReport(reportPath, 1)
CRViewer1.ReportSource = report
CRViewer1.ViewReport
Set report = Nothing
Set cRepApp = Nothing
Me.MousePointer = vbDefault
|