Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Does anyone know why the crystal viewer loads so slow the first time it is called. The second, third, fourth, etc.... time it is called it loads like a champ but the first time sure is slow. The folks at business objects are some pretty smart people so I'm sure it's something I'm not doing. Any ideas sure would be appreciated.
Posted
public frmCheckRequest(int batchID)
	{	
		
		InitializeComponent();
		ReportDocument rd = new ReportDocument();
		string rptTableName;
		string rptLocale=@"\\thisserver\Reports\CheckRequest.rpt";
		rd.Load(rptLocale); 

		rptTableName = rd.Database.Tables[0].Name.ToString();								
		TableLogOnInfo logOnInfo = new CrystalDecisions.Shared.TableLogOnInfo ();
		TableLogOnInfos logOnInfos = new CrystalDecisions.Shared.TableLogOnInfos();			
		logOnInfo.ConnectionInfo.ServerName = "goserver";
		logOnInfo.ConnectionInfo.DatabaseName = "db";
		logOnInfo.ConnectionInfo.UserID = "username";
		logOnInfo.ConnectionInfo.Password = "password";		
		logOnInfo.TableName = rptTableName;			
		logOnInfos.Add(logOnInfo);				
		crv.LogOnInfo = logOnInfos;		
		
		crv.ReportSource = rptLocale;		
		crv.Zoom(1);

		ParameterField crParam;
		ParameterFields crParams;
		ParameterValues crParamVals = new ParameterValues();			
		ParameterDiscreteValue paramValue;	
		crParams = crv.ParameterFieldInfo;
		
		crParam = crParams["@batchid"]; 			
		crParamVals = crParam.CurrentValues;			
		paramValue = new ParameterDiscreteValue();			
		paramValue.Value = batchID;						
		crParamVals.Add(paramValue);						

		

	}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...