Note that there are some explanatory texts on larger screens.

plurals
  1. POSAP Crystal Reports print command does not work
    primarykey
    data
    text
    <p>I'm new in SAP Crystal Reports using Visual Studio 10. I have generated a report in SAP Crystal Reports using a stored procedure which has three parameters. The report is loading nicely but when I try to print it and export it the following error is shown.</p> <blockquote> <p>Failed to export using the options you specified. Please check your options and try again. </p> </blockquote> <p>I also tried to hard type the ReportSource on the control properties but then login information pop up is shown, I need to give user name and password. I want to avoid this. Here is my code:</p> <pre><code>private void loadreport(DateTime dt1, DateTime dt2, int cd) { ReportDocument reportDocument = new ReportDocument(); ParameterField paramField = new ParameterField(); ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue(); ParameterFields paramFields = new ParameterFields(); //Set instances for input parameter 1 - @Dept paramField.Name = "@date1"; //*Remember to reconstruct the paramDiscreteValue and paramField objects paramDiscreteValue.Value = dt1; paramField.CurrentValues.Add(paramDiscreteValue); //Add the paramField to paramFields paramFields.Add(paramField); ParameterField paramField2 = new ParameterField(); ParameterDiscreteValue paramDiscreteValue2 = new ParameterDiscreteValue(); paramField2.Name = "@date2"; paramDiscreteValue2.Value = dt2; paramField2.CurrentValues.Add(paramDiscreteValue2); paramFields.Add(paramField2); ParameterField paramField3 = new ParameterField(); ParameterDiscreteValue paramDiscreteValue3 = new ParameterDiscreteValue(); paramField3.Name = "@cid"; paramDiscreteValue3.Value = cd; paramField3.CurrentValues.Add(paramDiscreteValue3); paramFields.Add(paramField3); CrystalReportViewer1.ParameterFieldInfo = paramFields; reportDocument.Load(Server.MapPath("testreport.rpt")); //Load the report by setting the report source CrystalReportViewer1.ReportSource = reportDocument; CrystalReportViewer1.DisplayGroupTree = false; //set the database loggon information. reportDocument.SetDatabaseLogon("sa", "12345", @".\SQLEXPRESS", "AnivetERP"); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload