Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

Printer Setup Button

I m using VB6 and Crystal Report 7. I have added the report into my application but cannot seems to let user choose which printer to print to. I also cannot seem to let the user choose if the report should be printed in landscape or potrait mode.

I've seen the other questions and answers in this forum but they do not seem to work with me. I cannot seem to find the printersetup object/property in my application.
I've tried to use the below code by DRRYAN3 but it says "object doesn't support this property".

"crRep.PrinterSetup me.hwnd"

I have tried to use the printer dialog control but I do not want to set the selected printer to the default printer everytime I choose to print to a particular printer.

Can anyone help me and pls provide me a more detail description way of doing it?
0
5Es
Asked:
5Es
  • 8
  • 4
  • 3
1 Solution
 
mlmccCommented:
This may help

http://support.crystaldecisions.com/communityCS/TechnicalPapers/scrprinterdependency.pdf.asp

I also have a printer selection screen I built for use with CR8 and the OCX.  It may be of use.

I can't get to my web site right now.  If you want it I'll post the link tonite.

mlmcc

0
 
vbjohnCommented:
I am still having the same problem also.  Please let us know if you have that up on your site.

John-
0
 
mlmccCommented:
What VB code are you using to call the report?

mlmcc
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
vbjohnCommented:
I have CR Professional instead of CR Developers Edition.  That is why I am having a huge problem.

John-
0
 
mlmccCommented:
CR7 didn't have a Developer edition.  Professional included all the developer tools.

What VB code are you using to call the report?

mlmcc
0
 
5EsAuthor Commented:
thanks for the pdf document. it gave me an insight on the workings for CR. But it's not what I asked for. I want a printer setup button in my report that allows a user to select specific printer when printing.
0
 
mlmccCommented:
Look at this site.  I have a form I use for  that purpose.  It should work for you or at least give you ideas on how to make it work.

http://groups.msn.com/McCrackenUNO/files.msnw?fc_p=%2FExperts%20Exchange%20Files&fc_a=0

You may have to join the group.  Base URL is
http://groups.msn.com/McCrackenUNO

Look in Documents - Expert Exchange Files
You want frm_Printer_setup.frm

mlmcc
0
 
vbjohnCommented:
I have CR 8.5 Professional.


CrystalReport1.ReportFileName = App.Path & "\DReport.rpt"
CrystalReport1.Connect = "pwd=firehose;username=sa"
CrystalReport1.StoredProcParam(0) = txtEmpSNum.Text
CrystalReport1.StoredProcParam(1) = txtEmpENum.Text
CrystalReport1.StoredProcParam(2) = cmbDedStart.Text
CrystalReport1.StoredProcParam(3) = cmbDedEnd.Text
CrystalReport1.Action = 1


John-
0
 
mlmccCommented:
Are you asking a question VBJohn or trying to provide help?

If you are asking your own question, please start a new question.  If you are trying to help you are way off the mark.

mlmcc
0
 
5EsAuthor Commented:
Hi, sorry for the late reply. I have been away for awhile. Anyway, I still cant find the solution to my problem. Thanks for the help guys but I don't think its what I want.

You see, I want a print setup button in my crystal report to appear in my vb program. It is to allow users to select different printer, paper orientation, and paper size without changing my default printer setting.

As for mlmcc, thanks for the site add but it did not help me.

Can you guys help?
0
 
mlmccCommented:
Why didn't my printer setup form help?

What more do you need?

mlmcc
0
 
5EsAuthor Commented:
i've seen your printer setup button form. it doest show how i can assigned the selected papersize/paper orientation in VB. i know how to come out with the dialog box to select printer and paper type n stuff, but i just cannot seem to make the printer accept my selected paper type.please help
0
 
mlmccCommented:
I'll try.  That wasn't a requirement for us so it wasn't added.  I may have to wait until Monday since I don't have CR and VB here.

mlmcc
0
 
5EsAuthor Commented:
Thanks. Meanwhile, I m still trying.
0
 
mlmccCommented:
According to my reference book there is a printerselect method for the OCX

crRpt.PrinterSelect

It might have what you need.

mlmcc
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 8
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now