Wrox Programmer Forums
|
BOOK: Professional Crystal Reports for VS.NET
This is the forum to discuss the Wrox book Professional Crystal Reports for Visual Studio .NET by David McAmis; ISBN: 9780764544033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Crystal Reports for VS.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2004, 01:31 AM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default RecordSelectionformula for crystalrpt in asp.net

Hi,

I am creating a record selection formula in asp.net to select the records and display in crystal reports.
When i give the range for a date field in database,It gives error:
"Datetime string is expected"
In database filed is in datetime format..

I have tried few of format methods also.no use..can anyone pls help me out ?
urgent !!
Below is my code:

dim recselect as string
Dim datefrom As DateTime = get_DateFrom.Text
Dim dateupto As DateTime = get_DateUpto.Text

        RecSelect = RecSelect & "{Sales.Sale_Date} >= " & datefrom & " " & _
        "and {Sales.Sale_Date} <= " & dateupto & ""

rpt.recordselectionformula = recselect

note : sales.sale_date is the value from database
get_datefrom is textbox in frontend

I have already tried with system.convert.todatetime also but in vain...

Can u direct me with syntax..
hope someone would have faced with same probs!!!
I heard the way is to separate month,year and day and then join as date and then use it for comparision..if someone have used this method kindly help..

-Active
 
Old September 29th, 2004, 10:03 AM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try this

strRecordSelection = " {employee.task_date} >= #9-23-2004#";

Ryan





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 3.5 answers in Professional ASP.NET 3.5 jminatel ASP.NET 3.5 Professionals 1 August 22nd, 2011 07:34 AM
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 12:33 AM
call window dialog component with asp.net/vb.net s3ng ASP.NET 1.x and 2.0 Application Design 0 June 21st, 2005 04:54 AM
Database diagram in .net using asp.net,c#.net scotttiger ADO.NET 2 February 16th, 2005 01:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.