Hi There Crystal Teckies....
Im having a battel with crystal once again..
I have some reports, which work finr in preview, however when trying to bulk print in the background, i am having a few issues.
Im using the crreport.PrintToPrinte method, which looks great, eacept that it is ignoring the report parameters i have set prior to calling PrinttoPrinter method, but they get totally ignored by crystal, and a blank report is printed.
Does anyone have the answer?
I have tried googling for a fair while, but have not been able to find anything.
try
{
this.Text = "Insurance for " + bookingref.ToString();
crReportDocumentInsurance = new Insurance(); // report = 0
crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = bookingref;
crParameterField = new ParameterField();
crParameterField.ParameterFieldName = "@BookingRef";
crParameterField.CurrentValues.Add(crParameterDiscreteValue);
crParameterFields = new ParameterFields();
crParameterFields.Add(crParameterField);
crvmain.ParameterFieldInfo = crParameterFields;
crvmain.ReportSource = crReportDocumentInsurance;
crvmain.Show();
if (print)
{
crReportDocumentInsurance.PrintOptions.PrinterName = printertouse;
crReportDocumentInsurance.PrintToPrinter(1,false,1,999);
this.Close();
}
else
{
}
}
catch (Exception ex)
{
MessageBox.Show(this,ReportError(ex.Message.ToString()));
}
Im trying.... will get there in the end......
Im having a battel with crystal once again..
I have some reports, which work finr in preview, however when trying to bulk print in the background, i am having a few issues.
Im using the crreport.PrintToPrinte method, which looks great, eacept that it is ignoring the report parameters i have set prior to calling PrinttoPrinter method, but they get totally ignored by crystal, and a blank report is printed.
Does anyone have the answer?
I have tried googling for a fair while, but have not been able to find anything.
try
{
this.Text = "Insurance for " + bookingref.ToString();
crReportDocumentInsurance = new Insurance(); // report = 0
crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = bookingref;
crParameterField = new ParameterField();
crParameterField.ParameterFieldName = "@BookingRef";
crParameterField.CurrentValues.Add(crParameterDiscreteValue);
crParameterFields = new ParameterFields();
crParameterFields.Add(crParameterField);
crvmain.ParameterFieldInfo = crParameterFields;
crvmain.ReportSource = crReportDocumentInsurance;
crvmain.Show();
if (print)
{
crReportDocumentInsurance.PrintOptions.PrinterName = printertouse;
crReportDocumentInsurance.PrintToPrinter(1,false,1,999);
this.Close();
}
else
{
}
}
catch (Exception ex)
{
MessageBox.Show(this,ReportError(ex.Message.ToString()));
}
Im trying.... will get there in the end......