Technical Questions
 Crystal Reports Forum : Crystal Reports 9, X, XI, 2008, 2011 : Technical Questions
Message Icon Topic: Whileprintingrecords Post Reply Post New Topic
Author Message
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 51
Quote adders Replybullet Topic: Whileprintingrecords
    Posted: 24 Aug 2011 at 1:11am
I am trying to mod a report so I can use the wo_estcomp data and use the select expert to display wo_estcomp when less than the customer required date. However crystal reports wont allow?
Where does the Whileprintingrecords grab its data from? I am unable to see the correct table within the database expert?

WhilePrintingRecords;
shared datetimevar wo_estcomp;
wo_estcomp;

Thanks

Adam
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 253
Quote sharona Replybullet Posted: 24 Aug 2011 at 2:21am
are you trying to create a shared variable? that is the formula you have above. this is generally used when retrieving value from a subreport to use in the main report.
what are you trying to do, create a parameter to filter the data when wo_estcomp (is this a date?) < then customer required date?
 
sharona
IP IP Logged
lockwelle
Senior Member
Senior Member


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4193
Quote lockwelle Replybullet Posted: 24 Aug 2011 at 3:39am
WhilePrintingRecords is just a tag to tell CR when you want something done, CR reads the data a couple of times, then formats the report.  Most of the time this is when the data is available.
 
If you can't see the table that you want in the database expert, CR isn't going to be able to find it.
 
What do you see when you run the formula?  I guess a date, quite possibly 1/1/1900.  You declared a variable and then displayed it, you never set it to a value.  If this is a field in the dataset that you want to use the formula would look like:
{table.wo_estcomp}
 
that would print the value of the table.field
 
HTH
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 51
Quote adders Replybullet Posted: 24 Aug 2011 at 4:01am
Excellent, I have now found the hidden subreport, and the correct data which I need to use.

The data pulled from the subreport is a date that our works order is expected to complete, I would like to be able to use that in the main report, which will enable me to only show lines where the works order date is greater than that of the customer required date. Identifing lines where we have potential late deliveries.

Thanks
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3350
Quote hilfy Replybullet Posted: 24 Aug 2011 at 8:07am

I don't believe that Crystal will let you use data from a subreport to filter data in the main report.

-Dell
DecisionFirst Technologies
7-Time SAP BusinessObjects Service Partner of the Year.
www.decisionfirst.com
IP IP Logged
lockwelle
Senior Member
Senior Member


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4193
Quote lockwelle Replybullet Posted: 24 Aug 2011 at 11:47am
I agree with hilfy, you couldn't filter the data, but you could suppress details and possibly groups if done correctly.
 
By the time that the subreport is run, I wold think that the data has been retrieved and filtered and so is set and it is cannot be filtered again.
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 253
Quote sharona Replybullet Posted: 26 Aug 2011 at 6:30am

if you want to supress sections using the shared variable, they have to be below the subreport.

in the section expert
format section
conditional supression
{@shared_variable_date}> {customer_required_date}
that will surpress your section
sharona
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.014 seconds.