Problem with Crystal Report to convert from VB6 to VB .NET.
-
Thursday, March 03, 2011 12:07 AM
Hello,
I have some problem with .dsr files conversion from VB6 to VS2008.
I'm using VS 2008 because I cant make the conversion from VB6 to VS2010.
I have open this thread in the forum of VB6 http://social.msdn.microsoft.com/Forums/en-US/vbinterop/thread/07eff046-c50c-457d-82a1-92455c0cff4c but for the problems with Crystal Report the moderator say me is better if I open a thread in this forum.
The VB6 project have some .dsr files and I use crviewer (Crystal Report is 8.0 version).
When I try to convert the project the .dsr files have this code added (and I cant see yhe report):
VERSION 5.00
Begin {BD4B4E61-F7B8-11D0-964D-00A0C9273C2A} CrystalReport18
ClientHeight = 9210
ClientLeft = 0
ClientTop = 0
ClientWidth = 13515
OleObjectBlob = "CrystalReport18.dsx":0000
End
Attribute VB_Name = "CrystalReport18"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Any of this code line are an error for VS2008 because in this code there are no declarations, there is an end instruction and :0000 is a syntax error.
So I dont understand how I can have a Crystal report object in an VS2008 (and VS2010) project!
Please anybody can help me?
Thank you very much.
Best regards.
All Replies
-
Thursday, March 03, 2011 5:12 AM
Hello,
See this SAP Crystal Reports thread for the answer.
Short story is the RDC is no longer shipped so you now have to convert your application to use .NET components and use Report Application Server.
To use you existing reports export them to RPT format and then you can add them to your .NET project.
Thank you
Don
Don Williams -
Thursday, March 03, 2011 8:16 PM
Hello,
thank you very much for your answer Don!
I made that you telle me and I import the rpt files.
Now I have a problem, in Visual Basic 6 I use a code like the example below.
I know that now all is changed and to use a report of Crystal Report I must use other proprieties and metod,a lso for CRViewer.
Can you help me an tell if you know where can I find sample code to manage CR report in an VB 2010?
Thank you very much.
best regards.
Example of code in VB6
Global numtab As Long
Global indntb As LongPrivate Sub Command6_Click()
CrystalReport1.DiscardSavedData
numtab = CrystalReport1.Database.Tables.Count
indntb = 0
Do While indntb < numtab
indntb = indntb + 1
CrystalReport1.Database.Tables(indntb).Location = pathn & "\promprem.mdb"
Loop
If Option1.Value = True Then
CrystalReport1.PrintOut
End If
If Option2.Value = True Then
CrystalReport1.Export
End If
End Sub -
Thursday, March 03, 2011 10:51 PM
Here they are. Also, you can not use the crviewer.dll in your .NET app either. Either the CR.Windows.form or CR.WEB.form
Another issue, convert your connection from direct access to ODBC or OLE DB. The JET engine is not supported in CR 2010.
Enterprise Samples (including managed and unmanaged ras)
http://wiki.sdn.sap.com/wiki/display/BOBJ/Business+Objects+SDK+Sample+Applications
Non-Enterprise Samples
http://wiki.sdn.sap.com/wiki/display/BOBJ/Crystal+Reports+SDK+Sample+Applications
Exporting Samples (RAS)
http://wiki.sdn.sap.com/wiki/display/BOBJ/NET+RAS+SDK+Samples#NETRASSDKSamples-Exporting%2FPrintingMake sure you update the references to use version 13.x.x.x only.
Thank you
Don
Don Williams- Proposed As Answer by SAPDon Friday, March 04, 2011 7:04 PM
- Marked As Answer by Larcolais GongModerator Monday, March 14, 2011 1:25 PM
-
Friday, March 04, 2011 3:35 PM
Thank you very much!
Best regards.

