on 09-27-2008 9:13 AM
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,
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.