Skip to Content
Former Member
Jan 08, 2010 at 02:19 AM

Drilldowns not working on .NET Crystal Reports Viewer



I am using CR2008 and VS 2005 (framework2.0). I have 2 issues with the crystal reports on .NET environment.

1. The drilldown are not working on .net environment when the report has any charts. Drilldowns works fine if the reports doesn't have any charts. If the report has any charts, the report is loaded with javascript errors and the drilldowns doesnt' work. The Javascript error is "lowerBoundType is null or not is an object."

However the all the drilldowns works fine in CR 2008 desinger.

2. I have a formula field which looks like below:

if x=y then " Nuclear" else "Coal"

In CR2008 designer, this displays well but when reprot is displayed dispalyed through .net crystal viewer, the white spaces are removed.

Please let me know if any one have some solution for above 2 issues.

below is the code I am using to launch the report on .net environment.


TableLogOnInfo crTableLogOnInfo;

ConnectionInfo crConnectionInfo = new ConnectionInfo();


ReportDocument crReportDocument = new ReportDocument();

string filename = Server.MapPath(@Request.QueryString["ReportURL"]);


//Set the ConnectionInfo properties for logging on to

//the Database

crConnectionInfo.ServerName = sServerName;

crConnectionInfo.DatabaseName = "";

crConnectionInfo.UserID = sUserName;

crConnectionInfo.Password = sPassword;

//Loop through all tables in the report and apply the

//connection information for each table.

foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crReportDocument.Database.Tables)


crTableLogOnInfo = crTable.LogOnInfo;

crTableLogOnInfo.ConnectionInfo = crConnectionInfo;



//Create parameter objects

XmlDocument xmlParamsDoc = new XmlDocument();

XmlNodeList xmlParams;

XmlNodeList xmlValues;

ParameterFields myParams = new ParameterFields();

ParameterField myParam;

ParameterDiscreteValue myDiscreteValue;



xmlParams = xmlParamsDoc.SelectNodes("//parameters/parameter");

foreach (XmlNode xmlParam in xmlParams)


// Set the ParameterFieldName to the name of the parameter created in the Field Explorer

myParam = new ParameterField();

myParam.ParameterFieldName = xmlParam.Attributes["name"].Value;

xmlValues = xmlParam.SelectNodes("values/value");

foreach (XmlNode xmlValue in xmlValues)


// Add parameter value

myDiscreteValue = new ParameterDiscreteValue();

myDiscreteValue.Value = xmlValue.Attributes["value"].Value;





// Finally Assign the params collection to the report viewer

crViewer.ParameterFieldInfo = myParams;

crViewer.ReportSource = crReportDocument;