Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Object reference not set to an instance of ... Post Reply Post New Topic
Author Message
Matheuus
Newbie
Newbie


Joined: 14 Mar 2011
Online Status: Offline
Posts: 5
Quote Matheuus Replybullet Topic: Object reference not set to an instance of ...
    Posted: 05 Apr 2011 at 4:27am
Hi, i'm trying to export a report to a PDF file.

I have a dataset.xsd with a few tables inside.

When i set the data source for this report by clicking with the right button on Database Field (at Field Explorer) and clicking on Set Datasource Location then specifying the exactly dataset path my app works fine. But what i need is do not specify the exactly path, i need that the app finds out for the dataset (I set only the dataset name, not the full dataset path) - this is what my boss says.

Here goes my code (This 3 tables i have inside my dtset):

iReport.Database.Tables["T9805_Ocorrencias_Notifcacoes_TEMP"].SetDataSource(_Tabela);                    iReport.Database.Tables["T0006_Orgao"].SetDataSource(DtImagem.Tables[0]);                iReport.Database.Tables["Cabecalho"].SetDataSource(DtCabecalho);

Ohhh! I almost forget to tell you guys what i got when i tried to set only the dataset name.

This is the error line:

iReport.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "ExportedReport");

Here goes the error message:

Logon failed. Detais: crdb_adoplus:Object reference not set to an instance of an object.


Thanks! Big%20smile
Matheus.


Edited by Matheuus - 05 Apr 2011 at 4:55am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.