Showing results for 
Search instead for 
Did you mean: 

How to remove sub-report data links from the sdk

0 Kudos

I use the crystal report SDK to generate pdf files. We're currently trying to use dataSet as a data source. Everything works but the subReports are empty after export. We modified the rpt: -> database expert -> links -> remove link and save the subReport and it works. The idea would be to reproduce the same thing from the SDK. I.e. go from a query with “INNER JOIN” to just “SELECT...”.

Acutal : 

FROM `AdditionalFees__` `AdditionalFees__` INNER JOIN `GdrFields` `GdrFields` ON `AdditionalFees__`.`parentKey`=`GdrFields`.`key`

Want this 
SELECT `language`.`TaxSummaryNetAmount`, `language`.`TaxSummaryVAT`, `language`.`TaxSummaryTaxAmount`
FROM `language` `language`

View Entire Topic
Active Contributor
0 Kudos

GO here to get the latest updates and info:

On that page is a test app I wrote for logging on for the main report and each subreport:


It's likely you need to add the subreport log on routines to get data, removing the links may work but not recommended, the subreport info will only return the last record. But without having the report it's hard to say for sure.

Note the subreport link is a parameter that begins with PM-

0 Kudos

Hello, I've tried to integrate your solution into my current code. But it doesn't work. To put it simply, I only have access to a dataSet and I've noticed that the sub-report data is not integrated when exporting to pdf. However, the setDataSource works correctly. Everything works when I manually delete the INNER JOINS of the SQL queries associated with the sub-report from the viewer or when I click on clear links. I've tried to delete them from the sdk without success. Is there a way of just dodging the links that have been linked from the viewer (to the database selection)? Once again, all's well with SetDataSource: I've got the data for my sub-reports, it's just that they don't appear. I've tried a lot of things like remove, clear without success. As a reminder, I only have one dataSet, which is identical to my MDB (except that it's a DataSet)