Rich Object in Report

Hello,

I have a blob field in a database firebird data.

Load the database and sending to the report via the Data Table.

But the Report is not Fast interpretanto text.

Can anyone help me?

The following code:

private void loadReport()
{
try
{
FastReport.Report report1 = new FastReport.Report();
report1.Load("relatorio.frx");

//Par??metros
Client client = new Client();
client.getDataRpRel(_os);

report1.SetParameterValue("os", client.OS);
report1.SetParameterValue("paciente", client.Nome);
report1.SetParameterValue("nascimento", client.Nascimento);
report1.SetParameterValue("medico", client.Medico);
report1.SetParameterValue("categoria", client.Categoria);
report1.SetParameterValue("admitido", client.Admitido);

//DataTable
report1.RegisterData(getDataSet(), "DataTable1");

//Exibindo o relat??rio
WebReport1.Report = report1;
}
catch (Exception ex)
{
throw ex;
}
}

private DataTable getDataSet()
{
//Instanciando objeto da conex??o
Conexao cx = new Conexao();
FbCommand cd = new FbCommand();

try
{
DataTable dt = new DataTable("DataTable1"); //Criando a Table

//Criando as colunas
dt.Columns.Add("resultado", System.Type.GetType("System.String"));

cx.conectar();
cd.Connection = cx.cn;
string query = "SELECT EX_LAUDO, EX_ASSINADO_P FROM FU_EXPAC WHERE EX_OS = @os AND EX_STATUS IN (05,07,12,19,20) PLAN (FU_EXPAC INDEX (FU_EXPAC_IDX4)) ";

cd.CommandText = query;
cd.Parameters.AddWithValue("@os";, _os);

//Instanciando o array dados
FbDataReader dr = cd.ExecuteReader();
DataRow drow;

Hashtable hashAssinaturas = new Hashtable();
while (dr.Read())
{
//Criando as rows
drow = dt.NewRow();
drow[0] = dr["EX_LAUDO"];
dt.Rows.Add(drow);
}

dr.Close();
dr.Dispose();
return dt;
}
catch (Exception ex)
{
throw ex;
}
finally
{
cx.desconectar();
cd.Dispose();
cd = null;
}

Comments

  • edited 7:58AM
    Could.

    I had forgotten to select the Data Table in Data Column.

    Thank you all.

Leave a Comment