Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Viewer error Post Reply Post New Topic
Author Message
swigartd
Newbie
Newbie
Avatar

Joined: 16 Sep 2010
Location: United States
Online Status: Offline
Posts: 13
Quote swigartd Replybullet Topic: Viewer error
    Posted: 16 Sep 2010 at 5:35am
I am developing in VB 2008 and Crystal Reports 2008.
 
When I go to display a report I get extraneous data on the report.
 
If I go to display the report a second time, I get the correct information.
 
The code that I am using is:
 
 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim Report As New crStandings

Report.SetDatabaseLogon(SQLuser, SQLpw)

Report.DataDefinition.FormulaFields("Season").Text = txtSeason.Text

Report.DataDefinition.FormulaFields("WKNumber").Text = txtWeek.Text

Report.Refresh()

crv1.ReportSource = Report

End Sub

I have never had this problem in any other version of CR.
 
Aiming beyond mediocrity
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 16 Sep 2010 at 8:09am
What the source of the extraneous data, the database or just plain garbage. I am not sure I have can help with the answer but I would like to understand the problem better as I follow this thread. This appears to one of those where I am about to learn something and that is always worthwhile.
 
Regards,
 
John W.
IP IP Logged
swigartd
Newbie
Newbie
Avatar

Joined: 16 Sep 2010
Location: United States
Online Status: Offline
Posts: 13
Quote swigartd Replybullet Posted: 16 Sep 2010 at 8:17am
There are multiple headers and extra detail lines.  The data is definitely from the SQL database... it is not garbage.
 
Its as if the report didn't properly update... simply running the subroutine again corrects the problem.
 
i have tried to duplicate the report initialization and refresh it... sometimes this corrects the problem.. sometimes it doesn't.
 
 
 
 
Aiming beyond mediocrity
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 16 Sep 2010 at 11:31am

Here is a shot in the dark, is it happening because of the way the report is initializing the data? It sound like the report is making an added processing pass when the report initially loads but not when it refreshes.  The code does have a Report.Refresh, call what happens if you comment that out?

John W.
IP IP Logged
swigartd
Newbie
Newbie
Avatar

Joined: 16 Sep 2010
Location: United States
Online Status: Offline
Posts: 13
Quote swigartd Replybullet Posted: 17 Sep 2010 at 4:12am
When I removed that line of code, the report had the data that existed when the report was created and saved.
 
It did not have current information.
 
Thanks for your response.
 
Dave
 
 
Aiming beyond mediocrity
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.