Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Blank Reports Post Reply Post New Topic
Author Message
klatu
Newbie
Newbie


Joined: 17 Jun 2008
Online Status: Offline
Posts: 4
Quote klatu Replybullet Topic: Blank Reports
    Posted: 17 Jun 2008 at 9:41am
Hi All,

I am having a problem with Crystal Reports 10 and .Net 2008.  I recently converted an asp.net app from 2003 to 2008.  Since doing so, all of my reports are empty (headers etc still show up, but no data is displayed). 

The reports worked fine in .net 2003.  Has anyone else encountered this problem or have any ideas how I can resolve this?  I've tried service packs already.

The report is loaded from a dataset, and stepping through the code the dataset is loaded fine.  Here is a snippet of what it's doing after the dataset has been loaded:

        Dim myExportOptions As CrystalDecisions.Shared.ExportOptions
        Dim myDiskFileDestinationOptions As CrystalDecisions.Shared.DiskFileDestinationOptions
        Dim myExportFile As String
        Dim myReport As New rpt_bill_ar_aging

        myExportFile = Request.PhysicalApplicationPath & Session.SessionID.ToString & ".pdf"
        myDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions
        myDiskFileDestinationOptions.DiskFileName = myExportFile

        With myReport.ExportOptions
            .DestinationOptions = myDiskFileDestinationOptions
            .ExportDestinationType = .ExportDestinationType.DiskFile
            .ExportFormatType = .ExportFormatType.PortableDocFormat
        End With

        myReport.SetDataSource(dsReport)
        crvReportViewer.ReportSource = myReport

        myReport.Export()
        Response.ClearContent()
        Response.ClearHeaders()
        Response.ContentType = "application/pdf"
        Response.WriteFile(myExportFile)
        Response.Flush()
        Response.Close()
        System.IO.File.Delete(myExportFile)


The code runs fine and there are no errors, but as I said the reports come up blank.  Any help would be greatly appreciated.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 17 Jun 2008 at 3:03pm
Have you tried to do a Verify Datasource? I'm guessing that during the conversion process the internal link the the DataSet schema got corrupted and needs to be refreshed by doing a Verify Datasource. If that doesn't work, I would do a Set Datasource and point it to the original schema file to force it to read it in again.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
klatu
Newbie
Newbie


Joined: 17 Jun 2008
Online Status: Offline
Posts: 4
Quote klatu Replybullet Posted: 18 Jun 2008 at 6:28am
Hi Brian,
I did do a verify datasource, since the original problem I had was CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.

I tried Set Datasource and I get the following error messages:

Query Engine Error: crdb_adoplus: To access classes in your project at design-time please build your project first, then try again.

(I did build my project).  Then I get the message

'Some tables could not be replaced, as no match was found in the new datasource.  Please specify the table required for any unmodified tables.'

This seems weird since the dataset is the original dataset the report was generated from. 

After I click close on the Set Datasource window I get the messages Unknown Query Engine Error and The Operation Could Not Be Completed. 
Running the report returns the same result, no data...

I appreciate the help, have you got any other ideas of what I can try or why it would think the dataset is invalid when I try to set it?

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 18 Jun 2008 at 9:31am
Well, the obvious problem is that the conversion screwed up the connection to the data source. I don't know how to fix this b/c everything you tried isn't being accepted. Are you using an XSD file that defines the XML schema? Is it possible to save your report elsewhere, delete it from the project, re-build the project, and then add the report back in?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 18 Jun 2008 at 9:32am
I also wonder if you could delete the report from the project, and then add in the ORIGINAL report (from the previous version). Maybe it will do a clean upgrade if the rest of the project has already been upgraded and that is all it has to do (less things to screw up in the process).
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
klatu
Newbie
Newbie


Joined: 17 Jun 2008
Online Status: Offline
Posts: 4
Quote klatu Replybullet Posted: 23 Jun 2008 at 8:22am
Thanks again for the help.  I haven't had a chance to try the two things you suggested above (busy with other tasks), but I'll give them a try and let you know how that works out. 

I'm also thinking I'll try and create a new report from scratch and make sure reports work at all for me in vs 2008.

I'll keep you posted on this once I've tried again.
IP IP Logged
klatu
Newbie
Newbie


Joined: 17 Jun 2008
Online Status: Offline
Posts: 4
Quote klatu Replybullet Posted: 23 Jun 2008 at 2:17pm
Problem solved!

It turns out the problem wasn't with the reports conversion, but with the datasets.  I had to recreate the dataset for each report, and that seems to have solved the problem.  It seems that the conversion from 2003 to 2008 doesn't handle the conversion of datasets very well.  If you compare the xml code between 2003 and 2008 they are very different, but the conversion process doesn't update the xml, only recreating the dataset from scratch seems to have worked.

To make it easier for anyone else who may have to do this, copying/pasting data tables between the old and new datasets seems to update the xml just fine.

Thanks again for all your help and suggestions.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 24 Jun 2008 at 12:01am
Great! Thanks for that update. I'll make a note of it and make sure it gets in my .NET 2008 book I'm working on now.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.