Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ADO recordsets in Crystal Reports
Message
From
04/12/2002 17:18:28
 
 
To
04/12/2002 17:08:29
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00729636
Message ID:
00729642
Views:
23
I think the problem is using the TTX file, which is not required. What happens if you map directly to ADO in the designer?


>Hi All,
>
>I am trying to get our Crystal Reports to use ADO Recordsets as their data sources instead of the ODBC to Fox Tables option we were using before.
>
>I have used the CreateFieldDefFile function in p2sMon.dll to generate the field definition files (.TTX files) from our Queries.
>
>The code goes like this:
>
>
>1. Create SQL View
>2. Use VFPCOM.CursorToRS to create the ADODB.RecordSet (The recordset that also is used to generate the TTX file)
>3. Load the report using CrystalRuntime.Application object
>4. Use loRpt.Database.Tables.SetDataSource(loADObject)
>
>
>Our problem comes with Date and DateTime fields, when VFPCOM turns the cursor into a RecordSet, it turns Date fields into ADO type 133, and datetime fields into ADO tpye 134. Type 133 is supposed to be Date/Datetime and type 134 is Time only.
>Crystal then only displays the time portion of any field that is converted into type 134 and only the date portion of any field converted into type 133. All of our date fields are DateTime for compatibility with SQL Server so at the moment all of our reports will only display the time and not the date.
>
>Has anybody had any experience with using this method to run reports and encountered this problem?
>
>We are using Crystal Reports 9 and p2smon.dll Version 8.6. FYI Crystal 8 and p2smon.dll version 8.5 convert date fields to DATETIME and datetime fields to TIME whereas the 8.6 version converts date fields to DATE and datetime fields to TIME.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform