ERRO CRYSTAL DESCONHECIDO!

MESTRE 13/05/2016 11:50:25
#462053
Fala galera blz? tenho alguns relatorios com List, daí fui passar alguns deles pra outro projeto porém quando vou imprimir ele da erro:

  An unhandled exception of type [ô]CrystalDecisions.CrystalReports.Engine.DataSourceException[ô] occurred in CrystalDecisions.ReportAppServer.DataSetConversion.dll

Additional information: Falha ao carregar as informações do banco de dados.

Erro no arquivo temp_bf7e85fc-eaaf-4ba1-8f36-6f97622017dc 7260_5688_{0FE30BDA-B5E5-4503-8CC2-31710C3D855A}.rpt:

falha ao carregar informações do banco de dados.


O engraçado é que eu coloquei a classe List no projeto novo também, no antigo ele imprime normal, no novo ele da erro..

Meu codigo do botão imprimir:

   
Dim _ListaIncertezaMedicao As New List(Of cls_IncertezaMedicao)
_ListaIncertezaMedicao.Clear()

For i = 0 To grdInstrumentos.Rows.Count - 1
_ListaIncertezaMedicao.Add(New cls_IncertezaMedicao)
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(1).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).Laboratorio = grdInstrumentos.Rows(i).Cells(1).Value
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(2).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).CodProd = grdInstrumentos.Rows(i).Cells(2).Value
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(3).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).IT = grdInstrumentos.Rows(i).Cells(3).Value
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(4).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).DescrEnsaio = grdInstrumentos.Rows(i).Cells(4).Value
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(5).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).Normas = grdInstrumentos.Rows(i).Cells(5).Value
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(6).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).Componentes = grdInstrumentos.Rows(i).Cells(6).Value
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(7).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).Resultado = grdInstrumentos.Rows(i).Cells(7).Value
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(8).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).IncertezaMedicao = grdInstrumentos.Rows(i).Cells(8).Value
If String.IsNullOrEmpty(grdInstrumentos.Rows(i).Cells(9).Value.ToString) = False Then _ListaIncertezaMedicao.Item(i).Status = grdInstrumentos.Rows(i).Cells(9).Value
Next

Dim oRP As ReportDocument
oRP = New CrystalReport1
oRP.SetDataSource(_ListaIncertezaMedicao.ToList) <-- ELE DA ERRO AQUI!!!


Dim tela As New frmRel
tela.Tag = [Ô]LISTA DE INCERTEZA[Ô]
tela.CrystalReportViewer1.ReportSource = oRP
tela.CrystalReportViewer1.RefreshReport()
tela.ShowDialog()
MESTRE 16/05/2016 11:44:08
#462128
up!
MESTRE 17/05/2016 08:47:42
#462169
Consegui resolver, tinha esquecido que o lixo do Crystal Reports não sei porque da pal no .Net Framework 4.5

resolvi no app.config
  <startup useLegacyV2RuntimeActivationPolicy=[Ô]true[Ô]>
<supportedRuntime version=[Ô]v4.0[Ô] sku=[Ô].NETFramework,Version=v4.0[Ô]/>
</startup>
Tópico encerrado , respostas não são mais permitidas