Print Page | Close Window

Groups in one page and printing them

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2172
Printed Date: 03 May 2024 at 5:55am


Topic: Groups in one page and printing them
Posted By: smukesh
Subject: Groups in one page and printing them
Date 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?



Replies:
Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: smukesh
Date 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?


Posted By: BrianBischof
Date 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>


Posted By: smukesh
Date 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


Posted By: BrianBischof
Date 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.



-------------
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>


Posted By: BrianBischof
Date Posted: 30 Jan 2008 at 11:32pm
Here is the post I was referring to
http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2178 - http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2178


-------------
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>



Print Page | Close Window