CR with visual studio 2010

SAP Consultant needs help regarding “CR with 2010 “

We are using CR with Visual studio 2010 for our applicaton.

Following is the code which I am using for generating the Report from collection of objects which I got from Webservice.

SampleReport Report = new SampleReport()

Then at WPF level, I am assigning Report source to the viewer as follows.

this.reportViewer.ViewerCore.ReportSource = Report;

Problem is it is asking me login credential. Which I believe interesting as All the information to generate the Report is ready to be picked up from the collection assigned as datasource.

Let me know what these credential could be. or how to override the behaviour.

Note: The designer had designed the .rpt file from xml, that WCF service provided.

I have looked around in forums for solutions, they dont have much information except following :

TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
                TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
                ConnectionInfo crConnectionInfo = new ConnectionInfo();
                CrystalDecisions.CrystalReports.Engine.Tables CrTables ;
                crConnectionInfo.ServerName = "YOUR SERVER NAME";
                crConnectionInfo.DatabaseName = "YOUR DATABASE NAME";
                crConnectionInfo.UserID = "YOUR DATABASE USERNAME";
                crConnectionInfo.Password = "YOUR DATABASE PASSWORD";
                CrTables = Report.Database.Tables;
                foreach (CrystalDecisions.CrystalReports.Engine.table CrTable in CrTables)
                    crtableLogoninfo = CrTable.LogOnInfo;
                    crtableLogoninfo.ConnectionInfo = crConnectionInfo;

The Problem is, I can understand if I would be connecting to DB to get the data… But getting data from object collection should not require the credential.

Consultant, needs help regarding
CR with Help!

Related posts

Browse more questions like this in module: BI

Question filed under SAP Module: BI Tags: 2010, STUDIO, Visual, Visual Studio 2010

Search for solution...

Disqus this Question

sap forum