• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 106
  • Last Modified:

Crystal Reports 11 print from preview has different information

When I generate a report preview in Crystal Reports 11, it displays all the proper information.  When I click print from the preview, it regenerates the information and grabs a different date range.  So the printed document is different from the information on screen.   If I just straight print its fine.
Capture.JPG
0
dbakker
Asked:
dbakker
  • 7
  • 7
1 Solution
 
mlmccCommented:
Is there a parameter that controls the date range?

mlmcc
0
 
dbakkerAuthor Commented:
No, I am not using parameters in the report.  Straight fields from the database.  The straight print comes up correctly, the preview comes up correctly on screen.   However when I click the print from the preview screen , that is when it changes
0
 
mlmccCommented:
Is the report saved with data?

Try this
Open the report
Click REFRESH
Let the report refresh
Click PRINT

Does it still change the date range?

mlmcc
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
dbakkerAuthor Commented:
Yes it still changes the date range after i hit the refresh and then print
0
 
mlmccCommented:
I can't think of any reason it would do that.

Can you upload the report file?

mlmcc
0
 
dbakkerAuthor Commented:
Here is the report file
Lot-Harvest-PGL.rpt
0
 
mlmccCommented:
I see your start and end date are just fields from a table.  How is the data put into that table.

mlmcc
0
 
dbakkerAuthor Commented:
The date entered from a report menu
0
 
mlmccCommented:
What report menu?

I thought you were running this from the Crystal designer?

If this is actually from code then any chance the code is changing that table during preview?

mlmcc
0
 
dbakkerAuthor Commented:
I sent this to the programmers and the reply i got back is

There’s no logic that changes anything in the report based on preview or print though. The dates simply get pulled from the form and set in the report’s dataset.

Is there a setting somewhere in the crystal report that is doing this?
0
 
mlmccCommented:
Are the reports run from the database or is a dataset passed to them?

Does the date range have default values?

mlmcc
0
 
dbakkerAuthor Commented:
The reports are designed with crystal and attached to the program.  The default date is todays date for start and finished
0
 
James0628Commented:
FWIW, the date range seems kind of meaningless, in that the report is not using it to select the data.  I don't see any record selection formula at all, so the report is just including everything that's in the tables.  So it seems that the data (dataset) is changing.  How/Why the dataset is changing, I have no idea.

 James
0
 
mlmccCommented:
When you print does it show different results?
Or is it just the dates at the top are different?

Can we see the code used to display the report and to print it?
You may need to handle a CALLBACK when the report is printed from preview.  That may be what is causing the issue.  I know if there are parameters for the report then the callback has to be handled properly to maintain the parameter values.

mlmcc
0
 
dbakkerAuthor Commented:
Thanks, this wasn't quite the issue , but it was very close enough to help us find it, so I will accept as solution.  The print from preview was calling information a second time and the code our programmer was using had an error in it so it pulled the date plus one day.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now