Reply
 
LinkBack Thread Tools Display Modes
Old 10-18-2010, 04:29 PM   #1 (permalink)
Senior Member
 
Join Date: Jul 2010
Posts: 100
avaltdan is on a distinguished road
Question Putting CURRENT Date on Reports

Hello All,

I'm trying to put the CURRENT DATE on a report (not the date modified, or created, or completed).

Does anyone know if there is a data field in the data explorer for this? And if so, where is it? I looked, but I couldn't find it. Perhaps it has a weird name?


Thanks for the help.

Dan
avaltdan is offline   Reply With Quote
Old 10-18-2010, 10:07 PM   #2 (permalink)
Senior Member
 
Join Date: Mar 2006
Location: Novato (20 miles north of San Francisco)
Posts: 445
fryeguy is on a distinguished road
Default

This code will use the Today() method.
The below code assumes you have a text box named "txtToday" located in a report section "Detail1":
Quote:
Sub Detail1_Format
Dim txtValToday As String = ""
txtValToday = Today().ToString("M/d/yy")
ReportUtilities.SetTextBoxValue(rpt,"Detail1" ,"txtToday", txtValToday)
End Sub
check out this link for additional info on formatting:
http://riderdesign.com/articles/Form...d-ASP.NET.aspx

Last edited by fryeguy; 10-18-2010 at 10:12 PM. Reason: added date formatting
fryeguy is offline   Reply With Quote
Old 10-19-2010, 03:54 PM   #3 (permalink)
Senior Member
 
Join Date: Jul 2008
Location: Olympia, WA
Posts: 342
grichards is a jewel in the roughgrichards is a jewel in the roughgrichards is a jewel in the roughgrichards is a jewel in the rough
Send a message via Skype™ to grichards
Default

optionally you can,
  • open report designer
  • select or create the Text field you want to display the date
  • Open its properties tab
  • update the "FormatString" property to "{RunDateTime:}"

there are a number of options about how RunDateTime time can be formatted in FormatString

for example: you can get creative like setting "FormatString" property to "This magnificent d-tools report was created on {RunDateTime:MM/dd/yyyy} at {RunDateTime: hh:mm tt}"...but that might be getting carried away.

enjoy
__________________
Systems Technician/Crestron Certified Programmer
www.ccisolutions.com
[SIGPIC][/SIGPIC]
grichards is offline   Reply With Quote
Old 10-20-2010, 08:02 PM   #4 (permalink)
Senior Member
 
Join Date: Mar 2006
Location: Novato (20 miles north of San Francisco)
Posts: 445
fryeguy is on a distinguished road
Default

Thanks for the simpler solution. Are properties such is {RunDateTime} documented ?
fryeguy is offline   Reply With Quote
Old 10-21-2010, 03:26 PM   #5 (permalink)
Senior Member
 
Join Date: Jul 2008
Location: Olympia, WA
Posts: 342
grichards is a jewel in the roughgrichards is a jewel in the roughgrichards is a jewel in the roughgrichards is a jewel in the rough
Send a message via Skype™ to grichards
Default

Most of the reporting is not documented via dTools. but you can find some useful information in the dataDynamics ActiveReports documentation

be warned that dTools seems to have stripped or limited a lot of the features of ActiveReports in the Report Designer.
__________________
Systems Technician/Crestron Certified Programmer
www.ccisolutions.com
[SIGPIC][/SIGPIC]
grichards is offline   Reply With Quote
Old 10-21-2010, 03:54 PM   #6 (permalink)
Senior Member
 
Join Date: Mar 2006
Location: Novato (20 miles north of San Francisco)
Posts: 445
fryeguy is on a distinguished road
Default

That is why I asked. It has been my experience that the ActiveReports classes have been a bit stripped down...
fryeguy is offline   Reply With Quote
Old 10-22-2010, 03:45 PM   #7 (permalink)
Senior Member
 
Join Date: Jul 2008
Location: Olympia, WA
Posts: 342
grichards is a jewel in the roughgrichards is a jewel in the roughgrichards is a jewel in the roughgrichards is a jewel in the rough
Send a message via Skype™ to grichards
Default

i've found that that quickest way to figure out this kind of thing is to randomly smash keys and occasionally press enter.... I think thats documented somewhere
__________________
Systems Technician/Crestron Certified Programmer
www.ccisolutions.com
[SIGPIC][/SIGPIC]
grichards is offline   Reply With Quote
Old 10-22-2010, 08:29 PM   #8 (permalink)
Administrator
 
SenoS's Avatar
 
Join Date: Mar 2006
Posts: 241
SenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond reputeSenoS has a reputation beyond repute
Default

The field you are looking for in the Date Explorer is dtr:Created. I know the name might be misleading but that field will populate with the current date when the report is run.
Attached Images:
File Type: jpg date created.jpg (39.5 KB, 0 views)
SenoS is offline   Reply With Quote
Old 10-22-2010, 08:44 PM   #9 (permalink)
Senior Member
 
Join Date: Mar 2006
Location: Novato (20 miles north of San Francisco)
Posts: 445
fryeguy is on a distinguished road
Default

you know Senos found this by trying grichards method listed above. Awesome.
Thanks!
fryeguy is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:13 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0
D-Tools, Inc.