A
Alx Sharp
Hello group!
I'm facing a strange problem in the application I'm writing...
I'm using crystal reports for printing sale receipts, and I wrote this lines of code:
rpt.Parameter_SaleID.CurrentValues.AddValue((int)this.CurrentSale.Row["SaleID"]);
rpt.Parameter_TaxValue.CurrentValues.AddValue(tax);
rpt.PrintOptions.PrinterName = "SAMSUNG SRP270";
rpt.SetDataSource(this.salesDataSet);
rpt.PrintToPrinter(1, false, 0, 0);
In my report I'm using parameter fields to set the record selection formula and to apply taxes.
Every line works fine, except for the last one, which rises the exception IndexOutOfRangeException that idicates that the index doesn't fit in the matrix (I don't know why).
If I use the report viewer to show a preview of the sale receipt, I can print it from the tool bar, but I don't want to use the viewer.
I'd really appreciate your help...
Thank you all...
I'm facing a strange problem in the application I'm writing...
I'm using crystal reports for printing sale receipts, and I wrote this lines of code:
rpt.Parameter_SaleID.CurrentValues.AddValue((int)this.CurrentSale.Row["SaleID"]);
rpt.Parameter_TaxValue.CurrentValues.AddValue(tax);
rpt.PrintOptions.PrinterName = "SAMSUNG SRP270";
rpt.SetDataSource(this.salesDataSet);
rpt.PrintToPrinter(1, false, 0, 0);
In my report I'm using parameter fields to set the record selection formula and to apply taxes.
Every line works fine, except for the last one, which rises the exception IndexOutOfRangeException that idicates that the index doesn't fit in the matrix (I don't know why).
If I use the report viewer to show a preview of the sale receipt, I can print it from the tool bar, but I don't want to use the viewer.
I'd really appreciate your help...
Thank you all...