Visual Studio Development Bookmark and Share   
 index > Crystal Reports for Visual Studio > Refresh button in crystalReportViewer
 

Refresh button in crystalReportViewer

The button for REFRESH in crystalReportViewer does NOT work by default. How to make it work?
I mean this one:



What I mean is, if I open crystalReportViewer, I have some customers inthere. Then I go and create a new customer (which is saved into a db). And when I come back to crystalReportViewer and click on Refrech button, the new inserted Customer is not shown.



I am a rookie at C#, so please don`t be mad if my questions gonna sound stupid...
Mitja Bonca  Friday, October 16, 2009 8:48 AM
Hi Mitja,

I think that button redraws the report based on the current data source. If you're using a DataSet then it'll just use the same data. The refresh won't automatically go and get fresh data for the DataSet you've created.

It should work if the report itself contains a connection to the database and the query, rather than specifying the data source at runtime. Although I've never tried this myself.
jimboynugget  Friday, October 16, 2009 1:45 PM
deleted
Mitja Bonca  Friday, October 16, 2009 2:23 PM
So it is not possible to refresh the data in the report using DataSet?
It sure has to be done something. Please for some help!

I`m not a rookie anymore, but I`m still learning.
Mitja Bonca  Friday, October 16, 2009 10:11 PM
and one more thing, in my report I have a post number (its an integer from a database). Its written like (for example) 4.3432. It`s a dot after the 1st number. It shouldn`t be there. It should be 43432. I can`t get rid of that dot. Anyone knows how to get rid of?
I`m not a rookie anymore, but I`m still learning.
Mitja Bonca  Saturday, October 17, 2009 8:16 AM

Ok, I understand that refresh button can not refresh data which are previously entered into dataSet.
So how to do a crystal report without dataSet?



I`m not a rookie anymore, but I`m still learning.
Mitja Bonca  Saturday, October 17, 2009 9:53 AM
I suspect that the "." being displayed in your integer is caused by the number format. The default is to include the thousands separator. Right click on the field and select "Format Object" and change the style to something more suitable.

You can create a database connection and SQL query directly in the report, but I've never used it. I think it makes it difficult to target the report to different servers. Here we have development, test and live servers so we need to be able to get the report data from whatever server the application is currently using. Sorry, I can't be more help. I just know enough Crystal to get my reports done....

The CrystalReportViewer has a ReportRefresh event that fires before the report is refreshed. Maybe you can reload your DataSet there and it will update the data in the report.
jimboynugget  16 hours 54 minutes ago

You can use google to search for other answers

Custom Search

More Threads

• Crystal Reports Project ??
• Best way to upgrade from VS 2003 Crystal Reports ....
• Problems Deploying App With CR
• Javascript error for web application crystal reports viewer
• Determine Version of Crystal Reports XI R2 after applying SP2 and Problems Passing Parameter
• How set fast / draft printing in cryastal report ?
• One report with four pages per student?
• ASP.NET 2.0 / VS 2005: Invalid class string exception on report load
• How can i use SQL Sum Statment
• How to add sort controls in a crystal report