Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic Parameter in C#

Hello and thank you

I am using SAP BusinessObjects Crystal Reports 2013 Support Pack 1

Version 14.1.1.1036

CR Developer

on a 64-Bit Windows 7 operating system

with Microsoft Visual Studio 2010 Professional

     target framework = .NET Framework 4.0

I went to sap.com and dowloaded the free trial for crystal reports.

I made a report.

then after a few weeks getting the hang of how to use SAP i started trying to develop SAP reports with visual studio using C#.

I made a basic report and on my machine the report works fine.

However people who do not have crystal reports on their machines cannot run the program I created.

So i went back to SAP.com and i downloaded the:

SAP Crystal Reports, developer version for Microsoft Visual Studio - Click Once (64 Bit)

The program I wrote is very simple.

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Shared;

using System.Data.SqlClient;

using CrystalDecisions.ReportSource;

CrystalDecisions.Windows.Forms.CrystalReportViewer CrystalReportViewer2 = new CrystalDecisions.Windows.Forms.CrystalReportViewer();

CrystalReportViewer2.ActiveViewIndex = -1;

CrystalReportViewer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

CrystalReportViewer2.CachedPageNumberPerDoc = 10;

CrystalReportViewer2.Cursor = System.Windows.Forms.Cursors.Default;

CrystalReportViewer2.Dock = System.Windows.Forms.DockStyle.Fill;

CrystalReportViewer2.Location = new System.Drawing.Point(0, 0);

CrystalReportViewer2.Name = "CrystalReportViewer2";

CrystalReportViewer2.Size = new System.Drawing.Size(802, 451);

CrystalReportViewer2.TabIndex = 0;

Controls.Add(CrystalReportViewer2);

CrystalDecisions.CrystalReports.Engine.ReportDocument crReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

crReportDocument.Load("J:\\Loans\\Darryn\\CrystalReports\\Credit Memo1.rpt");

when the report has no dynamic parameter i can view the report on another machine just fine. 

on my developer machine everything works fine all the time.

however on another machine which only has the link installed on it i get the following problem.

also if i put the dynamic parameter into the crystal report itself through the crystal report environment (not through visual studio)

i hit the dynamic parameter button and instead of saying what it wants me to set the parameter equal to i get it asking me to enter my database credentials.  however when i do nothing happens when i click ok.

Former Member
Not what you were looking for? View more on this topic or Ask a question