Skip to Content
Former Member
Aug 25, 2009 at 01:25 PM

.Net Viewer not using/receiving parameters


Dear all,

I have created a report viewer in .net c#. It is used to show reports on other computers that don't have Crystal Reports installed.

The problem is that the viewer can export and print reports correct, with the proper parameters that have been given in the commandline, only when trying to show the report in the ReportViewer in a windows form, the parameters aren't working anymore...

What is the command to show the report in the windows form viewer?

My current code is:

private void SetReportForm()
            // crViewer
            crViewer.ActiveViewIndex = -1;
            crViewer.BorderStyle = BorderStyle.FixedSingle;
            crViewer.Dock = DockStyle.Fill;
            crViewer.Location = new Point(0, 0);
            crViewer.Name = "crViewer";
            crViewer.SelectionFormula = "";
            crViewer.Size = new Size(292, 273);
            crViewer.TabIndex = 0;
            crViewer.ViewTimeSelectionFormula = "";

            crViewer.ShowExportButton = true;
            crViewer.ShowTextSearchButton = true;

            crViewer.ShowPageNavigateButtons = false;
            crViewer.ShowParameterPanelButton = false;
            crViewer.ShowRefreshButton = false;
            crViewer.EnableRefresh = false;
            crViewer.EnableDrillDown = false;
            crViewer.ReuseParameterValuesOnRefresh = true;

private void ShowReportInViewer()
         crViewer.ReportSource = Program.BlankReport;

Anyone familair with this problem??