Tip on how to pass parameters from C#.Net to Crystal Report Application Server

After a long time spent googling, bing'ing I finally found how to pass parameters from C#.Net to the Crystal Report Application server.

It turned out to be pretty easy.
ReportClientDocument rcd = new ReportClientDocument();

rcd.DataDefController.ParameterFieldController.SetCurrentValue("", "@StartDate", yourDateVariable.ToString() );

rcd.DataDefController.ParameterFieldController.SetCurrentValue("", "@EndDate", yourDateVariable.ToString());

Hope this helps you

No comments: