Correct column/view specification for retrieving data as correct type via NotesSQL 3.02g

Hi All,

I am trying to design a view in Lotus Notes in a way that when retrieving data via NotesSQL into Crystal Reports 11 - the fields that ARE date, DISPLAY as date ( not strings ).

I know I can convert them when in Crystal but it's much nicer if it happens by default.

Have tried setting the columns as Date/Time but no effect at the Crystal end.  ( still appear as Strings ).

The NotesSQL driver had a option "Return Notes Implicit Fields", when turning this on and going into Crystal I can see fields that were previously hidden such as:
- NoteCreated ( type DateTime )
- NoteAccessed ( type DateTime )
- NoteID ( type number )

These columns are not displayed in the view so I do not know what settings to use.  When I create a column using "Simple Function" - CreationDate - it still only appears as a string in Crystal.

Any ideas?
I have tried the Crystal Forum and they suggested using another driver.  Reference:

Any help greatly appreciated, thanks for reading ;)

Who is Participating?
BroadAustraliaConnect With a Mentor Author Commented:
It is possible to get the data coming across as DateTime without having to do a conversion in the reporting application.

9. Reporting off a View with the native driver returns all data types as string type. In order for the data types to retain their original type, the View must be based off a single Form and the View must be based on the condition “Form used”.

THIS IS ALSO TRUE FOR NOTESSQL DRIVER ( 3.02g atleast )..   Specifically what happened was I had a slightly complex selection formula in the view I was reporting off.  Replaced it with a simple: SELECT ((Form = "FrmLead"))   selection formula and now my column types are retained...

The more complex selection can then be done in your reporting application.

Sjef BosmanGroupware ConsultantCommented:
Thanks for thanking me for reading your question ;)

Firstly, I know nothing of CR, little of NotesSQL and a little more of Notes.

Just a suggestion: can you try with Access (or Paradox or whatever) to see what type of fields it comes up with? It might at least show that it is possible to get the type transfered.
marilyngConnect With a Mentor Commented:
Hi BroadAustralia,
How are you gathering the data in crystal?  are you using a standard SQL statement, or are you letting crystal grab it?   Crystal is very much like Access, so, when you use ODBC to grab notes information you can grab either the forms or the view.  You can use a SQL statement to collect the records, or you can use Crystal import/link (Access import/link) to link to and import the view or form.

Since I don't have Crystal here, I used Access... I got "TEXT" whenever the column "style" was not set to "Date/Time", or when the formula or field wasn't explicitly set to Date/Time.

The Notes implicit fields are just that, the hidden default fields.

If Crystal is doing it's own thing, then  you may have to use a standard SQL statement: cast(thisVAlue as smalldatetime) or Cast(thisValue as datetime)

Check out CAST and CONVERT in SQL server Books on line.

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

BroadAustraliaAuthor Commented:
Hi Sjef, the Azzurri huh? Now we are on the same side!

Great suggestion I pulled the data in Access using the same driver and no problems - each column interpreted correctly.  So the type does come across...  I haven't bought Crystal yet so I have put this into the hands of the reseller. ( along with this info that Access works fine )    It is after all the only thing stopping the sale!  :)

Hi Marliyn,

I am gathering the data via Crystal..  ( not SQL statement ).  
I am assuming a custom, hidden view, is the best / fastest way to generate the reports from the Domino database  ( working on the theory less data in the view the better )?  Why would you use the form option?  If you haven't got the ability to create/update custom view / or don't want to get someone in to make it for you?   Is there some other reasons?  Am I missing something?

Thanks for the responses.

YOu would use the form to use a SQL statement... :)  You could use the view, but then the fields might not be available.
Reporting off a View with the native driver returns all data types as string type << Really?  When I do this in Access, it doesn't.  Now if I'm doing a SQL statement: i.e. select this as Name1, cast(this2 as smalldatetime) as CreateDate, etc.  then I may have to load the statement with the correct parameters since SQL, MySQL, etc.,  or has smalldatetime, datetime.  Older versions of SQL had only Date and separate time.

Not sure if I answered your question, though.   Usually if it doesn't automatically import correctly, and changing the view or form doesn't help, then I do the conversions in the SQL statement and the massaging that goes on after.
BroadAustraliaAuthor Commented:
This is from a Crystal Help Document:
9. Reporting off a View with the native driver returns all data types as string type. In order for the data types to retain their original type, the View must be based off a single Form and the View must be based on the condition “Form used”.

This is true for NotesSQL( and apparently native driver ) WHEN the selection formula is used, it seems, for anything more than form selection... SELECT ((Form = "FrmLead"))  

Ie. Have this: SELECT  (Form = "FrmLead" & LeConfirmWrapUp = "Confirmed" & LeInHomeResult = "")    and all of a sudden you do not get your column TYPES transferred - you then have to create a Formula Field in Crystal to get your dates in date format etc. which is just a pain.  Why u cant use a more complex formula I would love to know.

Marliyn is it possible to accept:
Comment from BroadAustralia
Date: 07/18/2006 10:10AM EST   as answer, with yours as assisted ( with all points ) as it is an alternative?

You know I haven't been in Crystal for awhile, but it's about a clutzy as Access.  However, both allow you to create your own SQL query for the recordset.  Now, the down side to this is that you have to do a bunch of code to open the odbc connection, pass a sql statement to collect a recordset and then step through the recordset.   In access, you do this in VB.   I seem to remember that I could create SQL queries and ODBC connections in Crystal.  

At any rate, if you feel you've answered your own question in your post, then say so and as Customer Service to refund your points.:)
BroadAustraliaAuthor Commented:
sorry for some reason i thought u were admining this section now..  wonder why i thought that!  i will advise community support.
I do cleanup!  Which means if you leave this question for 21 days, I will close it for you.  But maybe not refund the points :)
All Courses

From novice to tech pro — start learning today.