Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal refresh of data problem

Status
Not open for further replies.

mori0043

Programmer
Oct 28, 2004
23
0
0
CA
Hello.

I am using ASP to display a chart through the crystal reports part viewer. When I change data in the database and I refresh the browser page, the chart displays the old data.

The changes are shown however if I, restart the report application sever or if I open the report in the designer and run it from there and then save it.

Can anybody help please???

 
Hmmm, you might be experiencing caching, or you may not be refreshing the data properly.

the solution depends upon how you're using whatever version of Crystal's software for whatever of the myriad of report viewing techniques from ASP.

Try posting technical information.

-k
 
I agree that it must be a refreshing problem. While debugging this problem, I realized that if I wait approximately 10 minutes the chart displays the correct information.

I am using Crystal Enterprise, IIS 5.1, IE 6

and I here is the code:

Function OutputReport(reportname)

Dim HTMLViewer, ObjectFactory
Set ObjectFactory=CreateObject("CrystalReports.ObjectFactory.2")
Set HTMLViewer = ObjectFactory.CreateObject("CrystalReports.CrystalReportPartsViewer")
With HTMLViewer
.IsOwnPage = true
End with
Dim clientDoc
Set clientDoc = objectFactory.CreateObject("CrystalClientDoc.ReportClientDocument")
clientDoc.Open reportName

Dim connInfo, propertyBag, loginPropertyBag

' Create the ConnectionInfo object
Set connInfo = objectFactory.CreateObject("CrystalReports.ConnectionInfo")
' Create the PropertyBag object
set propertyBag = objectFactory.CreateObject("CrystalReports.PropertyBag")
'Create the login to database blah blah....
...
...
'Pass in parameters
Call SetParameterDiscrete(ParamCollection.Item(0), ReturnNTUserId, ParamController, TempParam, NewValue)
Call SetParameterDiscrete(ParamCollection.Item(1), rs_SECURITY(0), ParamController, TempParam, NewValue)
'Set the report source location
HTMLViewer.ReportSource = clientDoc.ReportSource
'Start it up
call HTMLViewer.ProcessHttpRequest (Request, Response, null)
End Function

OutputReport ("C:\directory\Chart.rpt")


Any ideas????

 
Yeah, it sounds like the report is cached.

Hitting the lightning bolt should cause the report to refresh.

I believe that you can turn off the cache in the CMC by removing the -cache from the command line of the cacheserver service.

Or you can alter the Minutes Between Refreshes from Database (default is 15) in the CMC for the cacheserver.

-k
 
I am sorry... I meant to say that I had the advanced version of Crystal. I can't seem to find any cache settings anywhere.

Any ideas???

Thanks in advance.
 
Oh and since it is only a report part that is being shown, there is no lightning bolt in the display.
 
Make sure File -> Options -> Save Data with Report is not checked and save the report, this should force the report to run each time it's requested.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
I have all ready done this...

any other ideas??
 
A simple but efficient way to do it is to create an object from the form that is display the report. Like this:

Dim a as New frmReportForm
frmReport.Show

in the frmReportForm

Dim Report as New CrystalReport1
.....
etc..

Just create a new instance of the form that needs to display the report.


===================================
Never underestimate the power of stupid people in big numbers
===================================
 
Mori0043,

I'm having the same problem. Have you resolved yet? If yes, how?
 
No I never did resolve this issue. Please let me know if you come across anything.
 
We are using Crystal version 7.0 and I did find a workaround for this version and 8.0 on the Business Objects web site but have not tried it yet. If interested, look for this download on their support site. cr_webrefresh.exe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top