Mayank Jani

Mayank Jani

  • NA
  • 477
  • 77.4k

How to create CrystalReportView programmatically?

Mar 18 2018 8:39 AM
Dear Members,
 
Greetings of the day...
 
I am facing an irritating problem with CrystalReportViewer (CRV). in a winform there are some textboxes and command buttons. when i click a button for view a crystal report, it pops up on the form hiding the other controls behind itself.
 
my problem affects me at the time of coding. when I want to see or change (size or place) the control, the CRV always remain on front (like it 'Bring to Front' applied) of the controls. so, I can not see the controls (textbox etc.)
 
Is there any way to create the CRV at runtime by coding like I do the same with DataGridView. Please note that the CRV remains hidden at the time of the form load as I have wrote the code that way. a buttons click event shows the CRV. but at the time of coding, it appears continuously...
 
Please see the codes I have searched and wrote...
 the library I have added is..
 
using CrystalDecisions.Windows.Forms;
 
//the code.
CrystalReportViewer crvOne = new CrystalReportViewer();

crvOne.Height = 350;
crvOne.Width = 650;

crvOne.BringToFront();
crvOne.Show();
 
but it's not working. any help would be appreciated.
 
 
Thank You.
Mayank Jani

Answers (7)