Adding a Crystal Report to Your Iron Speed Designer Application

Step 1:  Drag and drop a Crystal Reports control from the Iron Speed Designer tool box onto a page in the Design tab in Iron Speed Designer.

Step 2:  Click “Configure...” above the control to display the Configuration Wizard.

Step 3:  Specify the text you want displayed on the button in your application.  By default, the text is “Show Report”.

Step 4:  Select “Crystal Report File” on the Variables list and choose your .RPT report file.

Step 5:  Select “Browse…” and locate the path for CrystalDecisions.CrystalReports.Engine.dll file.  Similarly select the “CrystalDecisions.ReportSource.dll” and “CrystalDecision.Shared.dll” files.

Step 6:  Click “Finish” to complete the configuration.

Step 7:  Select the page’s .VB or .CS code-behind file using the Application Explorer in Iron Speed Designer.

Step 8:  (Optional.)  If your report requires parameters, uncomment the following code and specify the required parameters.  If your report requires parameters, your application will not run unless they are specified!

C#:

//CrystalDecisions.Shared.ParameterDiscreteValue paramValue = new CrystalDecisions.Shared.ParameterDiscreteValue();

//paramValue.Value = "ALFKI";

//crReportDocument.SetParameterValue("CurrentCustID", paramValue);

//**********************************************

Step 9:  (Optional) If your report requires database sign-in, uncomment the following code and specify database sign-in information.  During development, you may not receive any error if you do not specify the database sign-in information.  However, when deploying your application, you may receive a “Logon failed” error, so please make sure to specify the database sign-in information.

////define and locate required objects for db login

//CrystalDecisions.CrystalReports.Engine.Database db = crReportDocument.Database;

//CrystalDecisions.CrystalReports.Engine.Tables tables = db.Tables;

//CrystalDecisions.Shared.TableLogOnInfo tableLoginInfo = new CrystalDecisions.Shared.TableLogOnInfo();

 

////define connection information

//CrystalDecisions.Shared.ConnectionInfo dbConnInfo = new CrystalDecisions.Shared.ConnectionInfo();

//dbConnInfo.UserID = "username";

//dbConnInfo.Password = "pwd";

//dbConnInfo.ServerName = "DBName";

 

////apply connection information to each table

//foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)

//{

     //   tableLoginInfo = table.LogOnInfo;

     //   tableLoginInfo.ConnectionInfo = dbConnInfo;

     //   table.ApplyLogOnInfo(tableLoginInfo);

//}

Step 10:  Press “F5” to run the application.  Press “Yes” if you are asked to save the changes.

Step 11:  Build and run your application.

See Also

Creating a Crystal Reports Report File

Adding a Crystal Report to Your Iron Speed Designer Application

Adding Crystal Reports References to Your Project

Opening Crystal Reports PDF Files in Separate Browser Windows

Deploying a Crystal Reports Application

Compilation Errors