cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when display report

Former Member
0 Kudos

Hi all,

I am trying to show report on Crystal Reports Server 2008 using Crystal Report Viewer (version: Crystal Report XI). This report extracts data from a table in SQL Server 2000. But when Report Viewer is opening this report, it displays 2 error messages, one by one, before display report:

- The first: "Information is needed before this report can be processed".

- The second: "Object reference not set to and instance of an object".

I do not know why, please help me to avoid them.

Thank you,

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

See if any of these sample apps will help you determine the code you should be using in your app:

[1|https://boc.sdn.sap.com/samples/84/1194]

[2|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]

[3|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32]

Ludek

Former Member
0 Kudos

Thanks Ludek, i will try following your links and post the result later.

Former Member
0 Kudos

Hi Dudek,

I had tried follow your links an I see:

Link 1: I did open report like the way in aspx sample websites but problem is not fixed.

Link 2 and link 3: It shows the way to open unmanaged report but my application is managed report.

Following is my source code of windows application that try to open report from CRS 2008:

private void OpenReport(int ReportID)

{

string sQuery = "Select * From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.Report' AND SI_ID = " + ReportID;

Commons.ceReportObjects = Commons.ceInfoStore.Query(sQuery);

if (Commons.ceReportObjects.Count == 0)

MessageBox.Show("Report not found!!!");

else

{

InfoObject ceReportObject = Commons.ceReportObjects[1];

TableLogOnInfos crTableLogOnInfos;

TableLogOnInfo crTableLogOnInfo;

ConnectionInfo crConnectionInfo;

crConnectionInfo = new ConnectionInfo();

crConnectionInfo.UserID = "as";

crConnectionInfo.Password = "sa";

//Define and set the logon information for the table

crTableLogOnInfo = new TableLogOnInfo();

crTableLogOnInfo.ConnectionInfo = crConnectionInfo;

//Pass the table info to a collection of tables.

crTableLogOnInfos = new TableLogOnInfos();

crTableLogOnInfos.Add(crTableLogOnInfo);

this.reportViewer.LogOnInfo = crTableLogOnInfos;

this.reportViewer.EnterpriseLogon = Commons.ceSession;

this.reportViewer.ReportSource = ceReportObject;

}

}

Variables in Commons class are defined and created.

Answers (0)