Wrox Programmer Forums
|
BOOK: Professional Crystal Reports for VS.NET
This is the forum to discuss the Wrox book Professional Crystal Reports for Visual Studio .NET by David McAmis; ISBN: 9780764544033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Crystal Reports for VS.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 4th, 2005, 02:36 PM
Registered User
 
Join Date: Oct 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default sub report logon error

VisitorTotals and VisitorsUnique are subreports that are added to the head of the report WIBStats. I am then outputting them to PDF. Each of these reports work fine if I do them singely, However if I either of the two subreports into the WIBStats report I get a
"CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed." error at where the oStream gets set.

I'd appreciate any ideas on how to fix this.
Thanks Dwayne

Code:
FilldsKioskActivitiesHistory1();
FilldsKioskVisitorTotals1();
FilldsKioskVisitorsUnique1();

VisitorTotals1 = new VisitorTotals();        
VisitorTotals1.SetDataSource(this.dsKioskVisitorTotals1); 

VisitorsUnique1 = new VisitorsUnique();        
VisitorsUnique1.SetDataSource(this.dsKioskVisitorsUnique1); 

WIBStats1 = new WIBStats();        
WIBStats1.SetDataSource(this.dsKioskActivitiesHistory1); 

MemoryStream oStream;            
Response.Clear();
Response.Buffer = true;            

oStream = (MemoryStream)WIBStats1.ExportToStream
    (CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

Response.ContentType = "application/pdf";                

Response.BinaryWrite(oStream.ToArray());
Response.End();
Dwayne http://www.adacprogramming.com
http://www.topwebsitetips.com
 
Old October 5th, 2005, 05:53 PM
Registered User
 
Join Date: Oct 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found my own answer. I've been to a ton of sites where a similar question was posted so I thought I'd Post the answer for the next guy.

Scrap the new instance of VisitorsUnique.rpt. Once you have added the subreport to the main report the instance is already created. Set the DataSource through the main report. Use what ever name the wizard created for the subreport. You add the subreport to the main by right clicking the section you want the subreport in, >>insert, >>subreport.

WIBStats1 = new WIBStats();
WIBStats1.SetDataSource(this.dsKioskActivitiesHist ory1);

WIBStats1.OpenSubreport("VisitorsUnique.rpt").SetD ataSource(this.dsKioskVisitorsUnique1);

MemoryStream oStream;

Dwayne http://www.adacprogramming.com
http://www.topwebsitetips.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database logon problem with Crystal Report jaucourt Crystal Reports 6 September 25th, 2009 11:39 AM
Logon Problem using Crystal Report and Asp.net ??? charles Crystal Reports 13 March 1st, 2007 02:49 PM
logon error while exporting crystal report hotshot_21 Crystal Reports 0 February 28th, 2006 07:37 AM
Crystal Report Logon failed mrleaps ASP.NET 1.0 and 1.1 Professional 1 October 13th, 2005 01:06 PM
Crystal Report: 20536: Unable to logon server caryraleigh Pro VB 6 0 December 4th, 2004 10:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.