Skip to Content
0

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

Apr 25, 2017 at 04:24 PM

45

avatar image

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

10 |10000 characters needed characters left characters exceeded

This is a picture of the report that I'm attempting to print. Each column with SEQ# are the subreports that won't print out a list of parts under each of them. Everything above those 3 boxes prints the way it is supposed to.

reportpichaving3subreportsaspartcolumns.png

Thanks Again,

Michael

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Don Williams
Apr 25, 2017 at 10:43 PM
0

Hi Michael,

Does it print from CR Designer?

Don

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0