Skip to Content
avatar image
Former Member

Subreport data is not printing on crystal report generated using VS 2015 with support pack 19

I have a Crystal Report template file with subreports that I'm attempting to populate using the following code inside of the windows service.

'Here's the way that we were applying the database data to the report and subreports in the system pre-upgrade to using support pack 19

For i As Integer = 0 To Report.Database.Tables.Count - 1

'Try

Report.Database.Tables(i).SetDataSource(GetDataSource(Report.Database.Tables(i)))

Next

For Each subReport As CrystalDecisions.CrystalReports.Engine.ReportDocument In Report.Subreports

For Each subreportTable As CrystalDecisions.CrystalReports.Engine.Table In subReport.Database.Tables

subreportTable.SetDataSource(GetDataSource(subreportTable))

Next

Next

I'm able to print the report and the header information is getting to the report. So it appears the

Report.Database.Tables(i).SetDataSource(GetDataSource(Report.Database.Tables(i)))

is working.

I've analyzed KBA 2163438 and pulled the sample code from there to get the print service to be able to print to the printer.

Unfortunately the subreport part of the code is not getting the data into the sub reports.

The templates were written in Crystal Reports Version 10.

Is there something I'm missing or maybe a new method needs to be used to accomplish the same thing.

Thank you,

Michael Helduser

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 25, 2017 at 10:43 PM

    Hi Michael,

    Does it print from CR Designer?

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Don, I went back to one of the previous jobs where this is working. It appears to be a configuration issue on our side. So thank you for responding but this appears to be working as it did before. I do have another question for you, I will create another question.

      Thank you for getting back to me,

      Michael Helduser