Columns not displaying in Crystal Report

Hi,

Iam using PUSH model to create my crystal report document.
The stored procedure which iam using returns a refcursor.
The first 3 columns of the table(FirstName,MiddleName and LastName) are combined as returned as single column,similarly columns address1,address2,city,state and zipcode are returned as single column.

Here is the Code:

OracleConnection cnOracle=new OracleConnection(connectionString);
cnOracle.Open();
OracleCommand cmdRegistrant = new OracleCommand("Pkg_WRTS_Retrieve.prc_getregdata", cnOracle);
cmdRegistrant.CommandType = CommandType.StoredProcedure;
try
{
OracleParameter paramFirstName=new OracleParameter("i_first_name",OracleDbType.Varchar2,50,ParameterDirection.Input);
if(txtFirstname.Text.Equals(string.Empty))
paramFirstName.Value=string.Empty;
else
paramFirstName.Value=txtFirstname.Text;
OracleParameter paramLastName=new OracleParameter("i_last_name",OracleDbType.Varchar2,50,ParameterDirection.Input);
if(txtLastname.Text.Equals(string.Empty))
paramLastName.Value=string.Empty;
else
paramLastName.Value=txtLastname.Text;
OracleParameter paramCountyName=new OracleParameter("i_county_name",OracleDbType.Varchar2,20,ParameterDirection.Input);
if(txtCounty.Text.Equals(string.Empty))
paramCountyName.Value=string.Empty;
else
paramCountyName.Value=txtCounty.Text;
OracleParameter paramCityName=new OracleParameter("i_city",OracleDbType.Varchar2,50,ParameterDirection.Input);
if(txtCity.Text.Equals(string.Empty))
paramCityName.Value=string.Empty;
else
paramCityName.Value=txtCity.Text;
OracleParameter paramCompany=new OracleParameter("i_compent_name",OracleDbType.Varchar2,200,ParameterDirection.Input);
if(txtCompany.Text.Equals(string.Empty))
paramCompany.Value=string.Empty;
else
paramCompany.Value=txtCompany.Text;

// create parameter object for the output
OracleParameter paramResultSet = new OracleParameter();
paramResultSet.OracleDbType=OracleDbType.RefCursor;
// this the output parameter which is returned from the stored procedure
paramResultSet.Direction = ParameterDirection.Output;

// add the parameter to the collection
cmdRegistrant.Parameters.Add(paramFirstName);
cmdRegistrant.Parameters.Add(paramLastName);
cmdRegistrant.Parameters.Add(paramCountyName);
cmdRegistrant.Parameters.Add(paramCityName);
cmdRegistrant.Parameters.Add(paramCompany);
cmdRegistrant.Parameters.Add(paramResultSet);

//Execute the CommandWrapper
OracleDataAdapter daUserDetails=new OracleDataAdapter(cmdRegistrant);
dataSet = new DataSet();
daUserDetails.Fill(dataSet,"WRTS_REGISTRANT");
RegReport = new RegistrantReportViewer();
RegReport.SetDataSource(dataSet.Tables[0]);
//RegReport.SetDataSource(dsReport);
RegistrantViewer.Visible=true;
RegistrantViewer.ReportSource = RegReport;


When i run the application the field's name and address are not displayed in the report,but all the other columns are displayed.
I think its because the datatabe has a combined value of 3 columns but im not able to display it in report properly.Similar for address column also.
Can anyone tell me how to map the datatable column to crystal report column so that the data will be displayed?????
Any reply will be appreciated!!!

Thanks,
Ratish.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories