Broken Report, Push Model

Posted on 2005-04-07
Last Modified: 2012-06-21
Ok, so I messed up a report I'm working on big time, I'm using, and have a dataset as where I'm pulling my data from.  I fill this dataset from code, send it to the report at runtime and it USED to work great!...until...

I added a new field to my dataset, and tried to get crystal report to update it, so I could use the new field from within the report.  I started doing things I probably shouldn't have done, like "Log Off/On Server" and "Add/Remove Database"  Well I messed it up somehow, and now when I try to run the report, which ran great and I haven't made changes to the code, I get the dreaded "logon failed" error.  This confuses me, because the report shouldn't be "logging" onto anything.  The report itself seems like it should work, my original database table is there, and when I view how this is connected it us using the classfile of the DataSet.   Let me describe what is happening...

'ds is my dataset, already filled

Dim oRpt As ReportDocument = New ReportDocument
oRpt.Load("E:\myReport.rpt", OpenReportMethod.OpenReportByDefault)
oRpt.SetDataSource(ds) 'When I step through the code, when I execute this line, I get about a 30 second delay, churns my processor really good, but the error doesn't happen at this point

Dim oStream As MemoryStream = CType(oRpt.ExportToStream(ExportFormatType.PortableDocFormat), MemoryStream) <-- error occurs immediately when I hit this line

The ugly error:
[LogOnException: Logon failed.]
   .F(String       , EngineExceptionErrorID 
) +506
   .A(Int16 , Int32 )
   .@(Int16 )
   CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
   CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)
   Intranet.ScheduleInvestments.Page_Load(Object sender, EventArgs e) in E:\www\Intranet\financial_reporting\ScheduleInvestments.aspx.vb:77
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +750
Question by:raterus
    LVL 100

    Expert Comment

    To get the reort to see "new" fields you need to Verify the Database.

    Open the report

    LVL 33

    Author Comment

    Oh, I tried that originally, don't remember it working.  This isn't my problem now though.  Any ideas on my current problem?
    LVL 33

    Author Comment

    Push Model + Extraordinary Large DataSet = Logon failed errors

    I had a simple error in my sql statement getting the data, it resulted in a mass amount of data being sent to my crystal report, which broke everything.  As soon as I fixed that the report started working again.
    LVL 100

    Expert Comment

    No problem.


    Accepted Solution

    PAQ-ing the question and refunding 500  points

    Thanks mlmcc !


    Community Support Moderator
    Experts Exchange

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now