Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Handling the suppress for the Sub report with Main Post Reply Post New Topic
Author Message
cheenu_vasan
Newbie
Newbie
Avatar

Joined: 06 Apr 2011
Location: India
Online Status: Offline
Posts: 16
Quote cheenu_vasan Replybullet Topic: Handling the suppress for the Sub report with Main
     Posted: 06 Dec 2012 at 4:35am
Techies,

Am using the CR 10 ver.

I have the field in main report that displays blocks of data, say some 6000 char length sometimes and at times its only 1000 char length.

So i hv planned to show the maximum content in the main and rest of the stuffs want to show in the other pages using the sub report. This i achieved with the Length function of the data field. (Sub report i placed in one of the details section of main report)

I have ensured to put the parameter while creating the sub report for the field link.I Have the problem on which scenario i should be suppressing the sub report content so that it is not duplicating when the report is loaded.

I have similar field where i want to show the excess content in the last pages of the report. Could please let me know what is the best way to achieve by suppressing the duplicates..

Regards
Cheenu


Thanks & Regards
Srinivasan B
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 07 Dec 2012 at 5:02am
Why do you need to use a subreport?  If I were doing this and using tables in the report, I would create several SQL Expressions that would split the long field data.  If I were using a command to provide the data for the report, I would do the splitting as part of the query in the command.
 
The problem with using subreports is that they create a separate connection to the database and run a separate query EVERY TIME they run.  So, if you have run subreport that is located in the details section, it will connect to the database and run a query for EACH detail record in your main report.  There will be times when you have to use a subreport to get the data you need, this is not one of them.
 
-Dell
IP IP Logged
cheenu_vasan
Newbie
Newbie
Avatar

Joined: 06 Apr 2011
Location: India
Online Status: Offline
Posts: 16
Quote cheenu_vasan Replybullet Posted: 08 Dec 2012 at 7:30am
Thanks for your feedback.

The report is intend to show multiple field for a single record (pulled from multiple tables). So my first page is able to show some 21 field in which one field is holding bulk.

So i see a necessity to show rest of the content in separate page without disturbing the other field data.

I have two other fields that require to show in another page. So meant to see only one records of fields shown in my report.

If the method i was referring was not efficient could you suggest me the other way of writing the script ? Db design was in freeze state and i have the requirement to achieve the above result in the report only. Suggest the best approach.
Thanks in advance.
Thanks & Regards
Srinivasan B
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 10 Dec 2012 at 3:11am
Please post the table definitions and information about how they link together.  I'd also like to know which tables you're currently using in the subreport vs. which are in the main report.  Also identify which tables have multiple records that need to display.
 
-Dell
IP IP Logged
cheenu_vasan
Newbie
Newbie
Avatar

Joined: 06 Apr 2011
Location: India
Online Status: Offline
Posts: 16
Quote cheenu_vasan Replybullet Posted: 24 Dec 2012 at 2:58am
Looks i have the way to place all my sub report in the report footer instead in the Details sections and then use the suppress field accordingly when i actually want to show them @ the end.

It worked. Hilfy thanks for your effort and suggestion on my questions.Thumbs%20Up
Thanks & Regards
Srinivasan B
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