Can a parameter in crystal report be used to select a printer

SOLVED

We have a parameter in our Sales Order form that changes what is printed based on the parameter.  I would like to have it print to a particular printer based on the parameter selected.  Actually I want to print from a particular tray in printer based on parameter, but thought that having a printer setup for one try and another printer for the other try would be easier.  Can this be done?  Thanks for any help. 

Parents
  • 0

    I was typing  a different response while testing it at same time seem to have got it to work although not sure, since I never used multi-part before.   I selected multi-part and selected 1 copy, collated, print shadow for "Work Order' and selected the printer setup to tray 2 with white paper.  The next line in Multi-Part I setup 1 copy, collated, print shadow for "Packing Slip" and selected the printer setup to tray 3 with yellow paper.  I clicked print and the parameter window appeared and I selected "work order" and it printed the work order to white paper, then the parameter selection was on the screen again.  I selected "Packing Slip" and son of a gun it printed to tray 3 on yellow and then the parameter window was gone.

    So using Multi-Part Form was the answer.  Thank you T-Man and Kevin M.

    I think I am definitely going to recreate this report to use the shadow text to suppress the different sections instead of the parameter.  So then if I use the Shadow text, instead of the parameter, both pages will just print when you click the print button which will be once less click.  :-)  Actually it ends up being like 8 clicks  less since in preview we were selecting the parameter, printer, print, parameter, printer, print.  

Reply
  • 0

    I was typing  a different response while testing it at same time seem to have got it to work although not sure, since I never used multi-part before.   I selected multi-part and selected 1 copy, collated, print shadow for "Work Order' and selected the printer setup to tray 2 with white paper.  The next line in Multi-Part I setup 1 copy, collated, print shadow for "Packing Slip" and selected the printer setup to tray 3 with yellow paper.  I clicked print and the parameter window appeared and I selected "work order" and it printed the work order to white paper, then the parameter selection was on the screen again.  I selected "Packing Slip" and son of a gun it printed to tray 3 on yellow and then the parameter window was gone.

    So using Multi-Part Form was the answer.  Thank you T-Man and Kevin M.

    I think I am definitely going to recreate this report to use the shadow text to suppress the different sections instead of the parameter.  So then if I use the Shadow text, instead of the parameter, both pages will just print when you click the print button which will be once less click.  :-)  Actually it ends up being like 8 clicks  less since in preview we were selecting the parameter, printer, print, parameter, printer, print.  

Children
  • 0 in reply to gseales

    Yes, that is exactly the strategy we use, with the Shadow Text driving the different output, which go to different printers / trays, all with a single print action.

    I believe you need to enter the Multi-Part options (and ShadowText) once per user / workstation (case sensitive) but it works well.

  • 0 in reply to gseales

    If you use paperless, remember that it will not have any shadow text. So if you account for that, you can have the copy the user gets emailed specific to that function as well. So that would give you the sales order, the picking sheet and a customer communication all with one click to print.

  • 0 in reply to T-Man

    T-Man I just want to make usre I have this correct.  Right now with the reports setup to still use the parameter and using multi-part, the paper prints out fine but the PDF of sales orderhas no pages.  I will make another crystal report to use the shadow text option instead of the parameter, but I want to make sure that when I do that, will I be able to use the "Print/PDF All" option and get the paper printout of the 2 options I put in the multi-part and the PDF of the sales order?

  • 0 in reply to gseales

    yes you should be able to have all of it working when you use the parameters. Each time it runs 1) Part 1 Sales Order 2) Part 2 Picking Sheet 3) Paperless, Crystal reports is running the report again. When it is a variable it is all passed to it. If it prompts then it may fail on one or all of the reports depending on how you are running it.

  • 0 in reply to T-Man

    I've always wondered about that and assumed the first Multi-Part option was used to create the PDF (since there is no option in the Multi-Part dialog to choose which report run is used for Paperless), but it sounds like you are saying it works differently.  If I set this up (below), does the report run a third time (just for Paperless)?

  • 0 in reply to Kevin M

    Correct. When running the print without paperless it will print all orders in the work file. It does it for each multi part so it can send it to each individual printer. When Paperless is used it must have only the order that it is sending paperless to so it will run the report for each order that is setup for paperless to attach the PDF.

  • 0 in reply to T-Man

    I learned something new today... thanks!

    The Paperless copy (in my quick one SO test) doesn't have the shadow text.

  • 0 in reply to gseales

    I figured out why the paperless PDF had no pages.  After printing the 2 options from the parameter screen I was clicking on the cancel or the "X" to close that window.  What I needed to do was when the parameter box had no option selected was to just click "OK" and the the PDF was created just fine...well my logo is missing.

    I will still create another form that uses the shadow option, so we can just click the print button and be done printing both documents and paperless PDF with a single click.  Will keep the parameter option around so we can print just one document when only one is needed.  Thanks for all the help.