Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Database Update on Report Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Scamp
Newbie
Newbie
Avatar

Joined: 05 Jun 2008
Location: United States
Online Status: Offline
Posts: 14
Quote Scamp Replybullet Topic: Database Update on Report
     Posted: 27 Aug 2010 at 5:10am
Here's a simple one (I hope). I would like a Crystal report to display the date of the last update to the database when the report is run. How can I do this? Thanks!
Ron
IP IP Logged
Jim257
Newbie
Newbie
Avatar

Joined: 17 Aug 2010
Online Status: Offline
Posts: 6
Quote Jim257 Replybullet Posted: 27 Aug 2010 at 5:50am
What database are you using? Are you talking about a specific table or is it just the last UPDATE statement that was run on the whole database?
IP IP Logged
Scamp
Newbie
Newbie
Avatar

Joined: 05 Jun 2008
Location: United States
Online Status: Offline
Posts: 14
Quote Scamp Replybullet Posted: 27 Aug 2010 at 5:59am

I am reporting off of an excel spreadsheet, 1 table. The spreadsheet gets updated daily, and I run a Crystal report from it after the update.

Ron
IP IP Logged
Penguin
Newbie
Newbie


Joined: 25 Aug 2010
Online Status: Offline
Posts: 10
Quote Penguin Replybullet Posted: 03 Sep 2010 at 2:47am

If you are using a  CRviewer than just update the the database before going into the viewer.  If you are going directly to printing then just update the database before printing. 

IP IP Logged
Scamp
Newbie
Newbie
Avatar

Joined: 05 Jun 2008
Location: United States
Online Status: Offline
Posts: 14
Quote Scamp Replybullet Posted: 03 Sep 2010 at 2:50am
I am updating the spreadsheet before viewing and printing. What I am trying to do is have the date and time that I updated the spreadsheet display on the report.
Ron
IP IP Logged
Penguin
Newbie
Newbie


Joined: 25 Aug 2010
Online Status: Offline
Posts: 10
Quote Penguin Replybullet Posted: 03 Sep 2010 at 3:16am

I see...you can access the file information and print the Modified: information.  You can find it in the "General" tab when you go to File->Properties->Tab "General" when you open up your excel file in Excel.  I'm not sure how you are creating the Database in your CR but it's a property of the file so you should be able to read the information

 



Edited by Penguin - 03 Sep 2010 at 3:17am
IP IP Logged
Penguin
Newbie
Newbie


Joined: 25 Aug 2010
Online Status: Offline
Posts: 10
Quote Penguin Replybullet Posted: 03 Sep 2010 at 3:43am
FileDateTime("location of file here") what you'll be calling and this will give you the date modified.  I'm not sure what you are using but in VB this is what you'll need to do.
IP IP Logged
Scamp
Newbie
Newbie
Avatar

Joined: 05 Jun 2008
Location: United States
Online Status: Offline
Posts: 14
Quote Scamp Replybullet Posted: 03 Sep 2010 at 4:49am
This does not work in Crystal. When I tried the FILECREATIONDATE function, it returned the date that the report was created, not the date the database (spreadsheet) was updated.
Ron
IP IP Logged
Penguin
Newbie
Newbie


Joined: 25 Aug 2010
Online Status: Offline
Posts: 10
Quote Penguin Replybullet Posted: 03 Sep 2010 at 5:55am

How are you using CR?  In VB or CRXI?

IP IP Logged
Scamp
Newbie
Newbie
Avatar

Joined: 05 Jun 2008
Location: United States
Online Status: Offline
Posts: 14
Quote Scamp Replybullet Posted: 03 Sep 2010 at 6:10am
I'm using Crystal Reports v9, and the database is actually an excel spreadsheet. I am exporting data into Excel from a ticket management system, and the report is designed to view all ticket details from the export.
Ron
IP IP Logged
Page  of 2 Next >>
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum