Print Page | Close Window

Whileprintingrecords

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=14177
Printed Date: 30 Apr 2024 at 4:18am


Topic: Whileprintingrecords
Posted By: adders
Subject: Whileprintingrecords
Date 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



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


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


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


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

-------------
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: lockwelle
Date 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.


Posted By: sharona
Date 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
mailto:%7b@shared_variable_date - {@shared_variable_date }> {customer_required_date}
that will surpress your section


-------------
sharona



Print Page | Close Window