cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove sub-report data links from the sdk

xan-esker-1
Discoverer
0 Kudos
145

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 : 

`AdditionalFees__`.`AdditionalFeeDescription__`
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
DonWilliams
Active Contributor
0 Kudos

GO here to get the latest updates and info:

https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html

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

how-to-parameters-in-crystal-reports-for-visual-studio-net

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-

xan-esker-1
Discoverer
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)