Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.NET, Parameters & Crystal Reports

Status
Not open for further replies.

Corinne

Programmer
May 15, 2001
146
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top