cancel
Showing results for 
Search instead for 
Did you mean: 

.Net Viewer not using/receiving parameters

Former Member
0 Kudos

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;
            
            Controls.Add(crViewer);
        }

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

Anyone familair with this problem??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I'm feeling stupid... found the problem:


crViewer.SelectionFormula = "";
crViewer.Size = new Size(292, 273);
crViewer.TabIndex = 0;
crViewer.ViewTimeSelectionFormula = "";

I cleared the selection formula....

Answers (0)