Can someone help me with this problem? I have a .NET application that needs to print a report out to a printer(in this case a barcode printer). I have the report printing just fine to the printer except I've realized that I need to pass a parameter to the Select statement to print the correct label. I am NOT using a CrystalReportsViewer.
This is what I have so far:
Dim frmReport As New BarCode1()
frmReport.PrintOptions.PrinterName = "\\IT1200"
frmReport.PrintToPrinter(1, False, 0, 0)
My question is: how do I pass the parameter? In the Crystal report (BarCode1) I have set up a parameter field (?ID), in the select expert I set the field in the table = to the parameter (?ID). When I select "Show SQL Query" under Database on the menu this is the query:
SELECT "CusCushionInv"."BaseModel", "CusCushionInv"."SerialNum", "CusCushionInv"."ID"
FROM "STKPRODDB"."dbo"."CusCushionInv" "CusCushionInv"
WHERE "CusCushionInv"."ID"=222375
Should 222375 be ?ID If so how do I change it at this point?
Thanks,
Corinne
This is what I have so far:
Dim frmReport As New BarCode1()
frmReport.PrintOptions.PrinterName = "\\IT1200"
frmReport.PrintToPrinter(1, False, 0, 0)
My question is: how do I pass the parameter? In the Crystal report (BarCode1) I have set up a parameter field (?ID), in the select expert I set the field in the table = to the parameter (?ID). When I select "Show SQL Query" under Database on the menu this is the query:
SELECT "CusCushionInv"."BaseModel", "CusCushionInv"."SerialNum", "CusCushionInv"."ID"
FROM "STKPRODDB"."dbo"."CusCushionInv" "CusCushionInv"
WHERE "CusCushionInv"."ID"=222375
Should 222375 be ?ID If so how do I change it at this point?
Thanks,
Corinne