Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Using subreports to check related tables Post Reply Post New Topic
Author Message
jrhodes
Newbie
Newbie


Joined: 08 Jun 2010
Online Status: Offline
Posts: 9
Quote jrhodes Replybullet Topic: Using subreports to check related tables
     Posted: 03 Nov 2011 at 4:57pm
Hi All,

We have a publishing database that contains details of publications. Publications can be linked to multiple subject keywords and linked to multiple authors. I want to be able to use a Subreport as a mechanism to do some checking on tables related to publications.

I have a keyword search using a parameter. What I want to do is pass the search parameter and the publication code to the subreport. The subreport will then check the keyword set for the publication code and then return a yes/no back to the main report if a match was found for the publication. I will then filter in the main report for matched publications.

The subreports would be run for each publication record in the main report using the details section.

The second issue is slightly similar to above. I want to pass the subreport a publication code then have the subreport build a string of the authors (e.g. Smith, J., Bloggs, J. etc.) and pass it back to the main report so it can be displayed.

If anyone is familiar with OO programming you would create a couple of methods that looped over the keywords or assembled the author string and then returned the result. You'd then just call these methods each time you needed them on a publication. This is kind of what I'm trying to achieve.

Does anyone know if this is possible or if theres a better way? Advice appreciated.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 04 Nov 2011 at 3:46am

well, in essence that is what your subreport...it's the method that loops over the data.

 
for the key words, you could probably create a parameter with multiple inputs and then you could loop through the array for each row of data
 
the second one is basically the same, just build a string in the detail section using a formula, suppress the detail section and display the results in a footer.
 
HTH
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum