|
-
Nov 8th, 2000, 03:44 AM
#1
Thread Starter
Lively Member
Hi,
I want to know if it is possible to reset the crystal reports control as I recieve an error when I try to swap between tables. What this means is that when i access 1 report using one table it loads the report but when i access anothter report with a different table it comes up with an error. Is there a command or code that will reset the control therefore allowing you to swap between tables.
Mike
-
Nov 8th, 2000, 08:44 AM
#2
Fanatic Member
Try this
I think of 2 solutions:
1. create a second CR control OR
2. change the CR properties by coding
sample: CrystalReport1.Datasource = your datasource
CrystalReport1.ReportFileName = your report
Hope this will help
Cheers
Ray
-
Nov 8th, 2000, 03:26 PM
#3
Addicted Member
Try this
Public Sub reSetDataFiles()
'This procedure is run before printing any Crystal Reports document.
'It takes care of the 20506 error.
frmMain.reportMain.DataFiles(0) = ""
frmMain.reportMain.DataFiles(1) = ""
frmMain.reportMain.DataFiles(2) = ""
frmMain.reportMain.DataFiles(3) = ""
frmMain.reportMain.DataFiles(4) = ""
frmMain.reportMain.DataFiles(5) = ""
frmMain.reportMain.DataFiles(6) = ""
frmMain.reportMain.DataFiles(7) = ""
frmMain.reportMain.DataFiles(8) = ""
frmMain.reportMain.DataFiles(9) = ""
frmMain.reportMain.DataFiles(10) = ""
End Sub
-
Nov 9th, 2000, 04:43 AM
#4
Thread Starter
Lively Member
Marex,
Thanks but that doesn't work. The error I am getting is:
error "-214741848(80010108)"
Method 'Action' of object "CrystalCtrl" failed
Anyone else got ideas?
-
Nov 9th, 2000, 05:43 AM
#5
Thread Starter
Lively Member
Sorry Ken,
That doesn't work either.
I have gone to microsoft and got the latest dev kit 2.6 and still no difference. I am using two forms but the first form uses one table and the other form uses the other.
I need them to run that way but there must be some way to fix the problem. I am using a form parameter though.
Mike
-
Nov 9th, 2000, 05:50 AM
#6
Fanatic Member
Hmmm
Very strange, I have many applications with more than
one CR control, no problems at all.
If you run the report from within CR itself, is it working
fine or not?
Which version of CR do you have, I'm using Version 7.
How is your coding inside the VB application.
Ones I had a problem, could'nt find anything, and just deleted the control and remaked it.
Cheers
Ray
-
Nov 9th, 2000, 06:10 AM
#7
Fanatic Member
Try putting a DoEvents before the ViewReport method of the control.
I have had problems before when trying to open another report after one has been opened.
It seems it is still processing when tring to view the new data.
Don't know if this will help but it's worth a try
Gary Lowe 
VB6 (Enterprise) SP5
ADO 2.6
SQL Server 7 SP3
OK I know my spelling and grammer is crap so don't quote me on it!
To err is human to take the P! is only natural !!
Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip

-
Aug 21st, 2001, 02:40 PM
#8
Lively Member
Run-time error 2147417848
Spawny,
Getting the exact same error. Were you ever able to figure out solution? Response greatly appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|