Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 9th, 2006, 02:52 AM
Registered User
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Shared variable problem in Crystal Reports 8.5

Hi everybody

I am faced with a tricky problem for which I need a solution urgently


I have a report whose sections and contents are detailed below

Page header-a
Page header-b
Group header-1

The group header-1 contains a subreport whose sections are detailed below

    report header-a which is suppressed
    report header-b which is suppressed
    group-header-1 which contains some headings

    Details contains the fields to be displayed.Also contains a
    formula that stores the sum of a field.I am using a shared
    variable for passing values between the mainreport and the
    subreport

    Group footer-1 is suppressed
    report footer a is supressed
    report footer b is suppressed


Main report sections continued


Details section suppressed
group footer-1 supressed
report footer enabled contains nothing
page footer-a
page footer-b contains a formula to display the value of a shared variable 'qtytot' that is totalled in the subreport

page footer-c contains a formula to reset the value of the shared variable

Now onto my problem

For certain items the subreport has more than one page
For example say item d/1/a has 3 pages
In page-1 and page-2 the page total is shown as 0. In the last page
that is page-3 the total is displayed correctly

My question is how to get the page totals to be displayed correctly on each page

Thanks in advance

Mathew











 
Old October 20th, 2008, 09:10 AM
Registered User
 
Join Date: May 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

say lets tell we need amount totals in each page. then we go ahead and do this.

To display amount totals in each page:
You need to use three formulae for this

formula1 @Reset
numbervar n;
whileprintingrecords;
n:=0

FORMULA2 @DETAILS
numbervar n;
whileprintingrecords;
n:=n+ToNumber({@Amount});

formula3 @Display
numbervar n;
whileprintingrecords;
n;

Place Formula1 at Report Header and suppress
Place Formula2 at Details Section and suppress
Place Formula3 at Report Footer and dont suppress


rupi





Similar Threads
Thread Thread Starter Forum Replies Last Post
pass a variable to Crystal Reports hodgesp Classic ASP Professional 2 July 9th, 2007 10:31 AM
Regarding problem in crystal reports 8 jerith_alphonse Crystal Reports 3 October 17th, 2006 06:29 AM
difference b/w shared and public variable lgeetha VS.NET 2002/2003 1 March 4th, 2005 08:24 AM
shared variable problem narooma.12 Crystal Reports 1 November 2nd, 2004 10:45 PM
Shared Variable between instant object. soccers_guy10 Pro VB 6 1 January 20th, 2004 05:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.