on 04-01-2011 8:11 AM
Good morning everyone.
Sorry for my English is not very good.
I have a poroblem with Subreports me explain.
Work with vb6 and crystal reports XI R2, I create a report with Subreports which are linked, when the bonds I create a parameter like this Pm-Comando.AboCodi. When I run the crystal reports works well and I do not give me problems but when I run and passed the data when you open asks me to enter the value of the command.
Not to do so they do not ask me and I go all right.
The code I use in vb6 is this.
Sql = "SELECT abogados.* from abogados"
Set rsComm = New Recordset
rsComm.CursorLocation = adUseClient
rsComm.Open Sql, Conexion, adOpenStatic, adLockOptimistic, adCmdText
'Sql1 = "SELECT aboct.* from aboct"
Sql1 = "select abogados., aboct. from abogados inner join aboct on abogados.abocodi = aboct.ctcodi"
Set rsComm1 = New Recordset
rsComm1.CursorLocation = adUseClient
rsComm1.Open Sql1, Conexion, adOpenStatic, adLockOptimistic, adCmdText
Dim crApp As New CRAXDDRT.Application
Dim crRep As New CRAXDDRT.Report
Set crRep = crApp.OpenReport("C:\InformeSub2.rpt", 1)
crRep.FieldMappingType = crAutoFieldMapping
crRep.OpenSubreport("InformeSub3").FieldMappingType = crAutoFieldMapping
crRep.Database.Tables(1).SetDataSource rsComm, 3
crRep.OpenSubreport("InformeSub3").Database.Tables(1).SetDataSource rsComm1, 3
OfrmRep.Caption = "titulo"
OfrmRep.CRViewer1.ReportSource = crRep
OfrmRep.CRViewer1.DisplayGroupTree = False
OfrmRep.CRViewer1.ViewReport
Took 2 weeks behind this problem and can not find the solution.
Please can someone help me.
Thank you very much to all.
1) Don't use craxDDrt.dll - you are not licensed to use it, use craxDrt.dll
2) Make sure you are on he latest SP. For CR XI R2 (11.5) this would be SP 6:
https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe
3) Not sure why you are using FieldMapping?
4) I see you setting the datasource to the subreport, what about the main report?
5) See some samples:
https://wiki.sdn.sap.com/wiki/display/BOBJ/ReportDesignerComponentSDKCOM+Samples
6) See the RDC Developer Help file:
C:Program FilesBusiness ObjectsCrystal Reports 11.5Helpen dcsdk_com_dg_docdoc dcsdk_com_dg.chm
7) More help:
😎 Use the search box in the top right corner of this page. It will give you results for Kbases, blogs, wikis, articles and ore.
- Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for the reply.
I upgraded to sp6 still gives me the same problem.
I've searched the forum and I found something but it does not work just look at the link says it'll have bad but I've watched many times and not bad ties.
To your question about the main report on this line will pass the information
crRep.Database.Tables (1). SetDataSource rsComm, 3
could help me please.
Thank you very much.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.