Solved

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

Posted on 2006-07-04
10
697 Views
Last Modified: 2013-12-18
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:
http://www.experts-exchange.com/Databases/Crystal_Reports/Q_21896634.html

Any help greatly appreciated, thanks for reading ;)

Broad
0
Comment
Question by:BroadAustralia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 17040502
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.
0
 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 500 total points
ID: 17047550
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.

Regards!
0
 
LVL 1

Author Comment

by:BroadAustralia
ID: 17048860
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.

Broad.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Expert Comment

by:marilyng
ID: 17049733
YOu would use the form to use a SQL statement... :)  You could use the view, but then the fields might not be available.
0
 
LVL 1

Accepted Solution

by:
BroadAustralia earned 0 total points
ID: 17126748
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.

Broad.
0
 
LVL 18

Expert Comment

by:marilyng
ID: 17127024
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.
0
 
LVL 1

Author Comment

by:BroadAustralia
ID: 17134157
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?

Broad.
0
 
LVL 18

Expert Comment

by:marilyng
ID: 17135204
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.:)
0
 
LVL 1

Author Comment

by:BroadAustralia
ID: 17135804
sorry for some reason i thought u were admining this section now..  wonder why i thought that!  i will advise community support.
0
 
LVL 18

Expert Comment

by:marilyng
ID: 17137383
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 :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question