Solved

Crystal Reports 11 print from preview has different information

Posted on 2015-02-09
15
96 Views
Last Modified: 2015-02-11
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
Comment
Question by:dbakker
  • 7
  • 7
15 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40598502
Is there a parameter that controls the date range?

mlmcc
0
 

Author Comment

by:dbakker
ID: 40598556
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 40598942
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:dbakker
ID: 40598945
Yes it still changes the date range after i hit the refresh and then print
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40598961
I can't think of any reason it would do that.

Can you upload the report file?

mlmcc
0
 

Author Comment

by:dbakker
ID: 40599009
Here is the report file
Lot-Harvest-PGL.rpt
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40599456
I see your start and end date are just fields from a table.  How is the data put into that table.

mlmcc
0
 

Author Comment

by:dbakker
ID: 40599482
The date entered from a report menu
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40599964
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
 

Author Comment

by:dbakker
ID: 40600563
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 40600924
Are the reports run from the database or is a dataset passed to them?

Does the date range have default values?

mlmcc
0
 

Author Comment

by:dbakker
ID: 40601281
The reports are designed with crystal and attached to the program.  The default date is todays date for start and finished
0
 
LVL 34

Expert Comment

by:James0628
ID: 40601442
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
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40601644
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
 

Author Comment

by:dbakker
ID: 40603742
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question