Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Groups in one page and printing them Post Reply Post New Topic
Author Message
smukesh
Newbie
Newbie
Avatar

Joined: 29 Jan 2008
Location: India
Online Status: Offline
Posts: 3
Quote smukesh Replybullet Topic: Groups in one page and printing them
    Posted: 29 Jan 2008 at 2:04am
Hi,
 
I have created report in crystal report studio2005. I have created group. I want to show all groups in one page but each group should be printed on separated page. To solve this I enabled SECTION EXPERT one feature New Page After, but we need to select each group for viewing. In case of printing it is working fine, i.e. in one command it is printing each group on separate page.
 
Please anyone having idea about this?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 29 Jan 2008 at 9:56am
Can't be done.  What you see when a Crystal Report is viewed on the screen is what the report will print.  That's just the way it works.
 
-Dell
IP IP Logged
smukesh
Newbie
Newbie
Avatar

Joined: 29 Jan 2008
Location: India
Online Status: Offline
Posts: 3
Quote smukesh Replybullet Posted: 29 Jan 2008 at 10:03pm
Hi,
 
I feel I have not described problem properly. Pls have a look it again.
Steps:
1. Created web report.
2. Created group based on one field.
3. I am able to see all groups detail in one page.
4. At this moment If I print, all groups gets printed in one page.
5. Now I enabled New Page After property of Section Expert of Detail section.
6. Now I can view detail of only that group which I have selected from group tree.
8. But at this moment if I print report every group got printed on different page.
-------
9. My Problem is to show all group detail in one page but print each group in different page.
 
It seems some coding is required.
Pls anyone have idea to solve this problem?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Jan 2008 at 10:51pm
This description is MUCH better than the first one, but I think that Dell is going to give you the same response. It sounds like you want to look at the report on the screen and see all the groups together and then click the Print button and have the groups separated by page. However, what you see on the screen is what gets printed on paper.

One way around this would be to create your own print button on the page. When the user clicks YOUR print button, modify the ReportDocument object and set the New Page After property to be True. That way you are actually changing the report definition prior to sending it to the printer. This property is located at ReportDocument.ReportDefinition.Sections(sectionname).EnableNewPageAfter.

If this is too fast for you, I just posted a response to another question that modifies a TextBox object a few hours ago. Have a look at it and then use the class definition I just showed you to modify the correct property.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
smukesh
Newbie
Newbie
Avatar

Joined: 29 Jan 2008
Location: India
Online Status: Offline
Posts: 3
Quote smukesh Replybullet Posted: 30 Jan 2008 at 10:36pm
Hi Brian,
I tried to search your response posted, but I could not found. As this is too fast for me so please try to help me out.
Thanks,
~Mukesh
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 30 Jan 2008 at 11:31pm
It would be something like this (but I'm only typing this in off the top of my head, so you'll probably have to fix something).

Dim mySection As CrystalDecisions.CrystalReports.Engine.Section
mySection = CType(myReport.ReportDefinition.Sections("Section2"), CrystalDecisions.CrystalReports.Engine.Section)
mySection.EnableNewPageAfter = True
Change "Section2" to be whatever section you are modifying.



Edited by BrianBischof - 30 Jan 2008 at 11:31pm
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 30 Jan 2008 at 11:32pm
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.