|
-
Jun 7th, 2009, 11:18 AM
#1
Thread Starter
Lively Member
[RESOLVED] Crystal Report Date Conversion
Hi,
I have a Date field on a SQL database stored as varchar. I want to call a report and select data for the current month but have to convert the text to date first. This is the code line I'm using :
orpt.DataDefinition.RecordSelectionFormula = "{Month(convert(varchar(20), cast([Transaction Details].TDate as datetime), 103))} = " & dt.Month
I keep on getting errors and I am not too sure if Im on the right track. Please assist
High hopes go to all that looks down!!!
-
Jun 9th, 2009, 01:15 PM
#2
Thread Starter
Lively Member
Re: Crystal Report Date Conversion
Ok, scrapt this idea. I dynamicly set the reports datasource to a dataset. But now, since I used the Database Expert to design the report, it creates the report with all the records showing as double on the report. How will I go about to avoid this from happening?
High hopes go to all that looks down!!!
-
Jun 21st, 2009, 02:50 PM
#3
Thread Starter
Lively Member
Re: Crystal Report Date Conversion
Solved!!!!
Do not try to create a report with the Database expert and then dynamicly set the report's datasource. This will cause duplicate values.
When you create a report use the command feature in the database expert, then create your report from the command you created. Then from there you can dynamicly set the report's datasource. This also made it possible for me to use normal SQL queries in VB.NET.
High hopes go to all that looks down!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|