var FeedUrl = 'http://www.news-sap.com/feed/'; var MaxCount = 1; var showDate = 'none';

CR with visual studio 2010

SAP Consultant needs help regarding “CR with visual studio 2010 “

Hi
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()
report.SetDataSource(response.Items);

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;
                    CrTable.ApplyLogOnInfo(crtableLogoninfo);
                }

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 visual studio 2010 Help!





Browse more questions like this in module: BI


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



Search for solution...


Disqus this Question






sap forum