2 printer issues
I am using the following code to view a crystal report:
Dim param1 = New CrystalDecisions.Shared.ParameterField()
Dim ParamVal1 = New CrystalDecisions.Shared.ParameterDiscreteValue()
Dim paramFields = New CrystalDecisions.Shared.ParameterFields()
param1.ParameterFieldName = "group"
ParamVal1.Value = strGroup
param1.CurrentValues.Add(ParamVal1)
paramFields.Add(param1)
Dim param2 = New CrystalDecisions.Shared.ParameterField()
Dim ParamVal2 = New CrystalDecisions.Shared.ParameterDiscreteValue()
param2.parameterFieldname = "FromDate"
ParamVal2.Value = strFromDate
param2.CurrentValues.Add(ParamVal2)
paramFields.Add(param2)
Dim param3 = New CrystalDecisions.Shared.ParameterField()
Dim ParamVal3 = New CrystalDecisions.Shared.ParameterDiscreteValue()
param3.parameterFieldname = "ThruDate"
ParamVal3.Value = strThruDate
param3.CurrentValues.Add(ParamVal3)
paramFields.Add(param3)
Crystal.ParameterFieldInfo = paramFields
Crystal.ReportSource = rpt
Crystal.RefreshReport()
rpt.PrintOptions.PrinterName = "\\isaap\brother"
rpt.PrintToPrinter(1, False, 1, 1)
The report is a simple report (to test the crystal viewer so far) that displays the three parameters on the page. My problem is that when I print the report, the parameters do not print. If I add a label to the report, I can see the label, but not the boxes with the parameters. Any ideas what's going on here?
Also, I would like this report to print to the default printer on the pc that is accessing it, so everyone is not printing to my printer. I've read that you can not specify the printername and it will print to the default, but when I do that, it does not print (or error) at all. Any ideas what is going on with that?
Thanks,
Dave
|