cancel
Showing results for 
Search instead for 
Did you mean: 

V6 and CR XI R2 Subreports

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

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:

http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/105181db-cb1d-2b10-38a4-b0a30e268e40&override...

😎 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

Former Member
0 Kudos

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.

former_member183750
Active Contributor
0 Kudos

Not much more I can do to help unitl you do what I recommended in my previous post...

- Ludek

Answers (0)