[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Pervasive database and Crystal Report

Posted on 2009-04-17
6
Medium Priority
?
799 Views
Last Modified: 2012-05-06
I have a question about Crystal Report running on Pervasive.SQL 9.50 database.
My client asked me to correct some Crystal Report 8.5 those are part or his application. Crystal reports are run on Pervasive.SQL 9.50& database that is seating on his server.
He wants to edit several reports. He needs to add additional fields on those reports. One of those new fields should show a picture in jpeg format.
On his test PC he installed Crystal Report 8.5 Light ( I assume that it is standard version of CR8.5).He told me that he can open reports in design view but can not trace report fields to tables in database.
As I am complete novice to Pervasive database I have some basic questions.
First if data source for these report in are not tables from Pervasive database is it possible that data source is created on fly and how I can see it or reach it to add new field to it.
Second how I can add table field in Pervasive database? Is it done through PCC tool or database has other tool for it?
And last is it good option to store picture in separate folder and have just path in table field pointing to that file so I can use that path in my report; or to store picture in table filed in pervasive database.

Any help will mean a lot to me.
0
Comment
Question by:Taras
  • 2
  • 2
  • 2
6 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 24168687
In Crystal 8.5 you will have to store the picture in the database.  There is no capability to use the filename.

I am not familiar with the LIGHT version.

To get new fields to show in the list you need to VERIFY THE DATABASE.  It is under the DATABASE menu.

mlmcc
0
 

Author Comment

by:Taras
ID: 24169017
mlmcc.
Thanks for your respond however I would appreciate if you have any answer on my questions first second and third.
You touched third question partially.
Anyway thanks a lot.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24174218
You can attach a dataset to a report.  Here is an example
http://www.emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx

I don't know Pervasive so I don't know how to add a field to the table.

The third one is as above.  You need to store the picture in the database.  CR8.5 can't use the filename from the database.  That was added with CR XI

mlmcc
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 29

Accepted Solution

by:
Bill Bach earned 2000 total points
ID: 24184517
1) The data source CAN be created on the fly, which is very common for the application.  In PSQLv9, databases are comprised of the raw "Btrieve" data files accompanied by a set of DDF files, minimally FILE.DDF, FIELD.DDF, and INDEX.DDF.  The combination of the two creates a Named Database.  You can see the Named Databases that are defined by starting the Pervasive Control Center (PCC) on the server.  Open up the servername, then Databases.  To find the path to a DDF set and a file set, right-click on the database and select "Properties".  To create a new Named Database and Engine DSN on the server, right-click Databases and select New Database, then fill in the details.

To access this Engine DSN from a workstation, you must configure a client DSN.  In the ODBC Administrator, create a new System DSN as a Pervasive Client DSN.  Provide the server name, and in the box on the bottom, refresh the names and select the server's Engine DSN that you want to link it to.  For consistency, it is good to keep the Client DSN with the same name as the Engine DSN, but this is not required.  You can now access the database from the workstation using just the DSN name.

2) Adding fields to a table, or adding new tables, can be done several ways.  In the Pervasive Control Center, you can rght-click the table and select Edit Table Design.  Make sure that all users are OUT of the file when you are working on it, or it will fail.  Click the SAVE icon to save your changes.  Please note, though, that if you are modifying the database for an active application, adding or changing fields may completely trash the application, which may not be expecting the new layout.  You may be better off creating a new table of some kind and giving it a key value that relates to the primary key of the table that you want to modify.  This is a bit safer, since the original application won't see the change, but you can do whatever you want in your own private table.  Creating new tables can also be done from the GUI by right-clicking and selecting "Add Table".  If you are familiar with SQL, you can also fire the appropriate CREATE TABLE or ALTER TABLE statements -- just remember to have a backup before doing ANYTHING, just in case the application balks at what you are doing.

3) PSQL does support the internal storage of any object via the BLOB field.  However, storing the data in the file may be the problematic part of all of this.  If you can create a table with a blob field and populate it, then I'd go for that.  If not, then I am guessing that moving to CR-XI and storing just the pathname makes a LOT more sense.
0
 

Author Closing Comment

by:Taras
ID: 31571443
Hi BillBach.

Thanks for your answers. You gave me good starting point.
 I downloaded Pevasive.SQL 10 trial version and played a little with it to get used with functionalities and options.

I can see that V10 support LONGVARBINARY data type I am not sure for 9.5 do you know it?

If  I understood your suggestion right;
Instead of adding new filed to table e.g. tblproduct you proposed to create new table.
New table e.g. tblProdImages.
This table will have two fields one field e.g. ImageID primary key related to primary key of table tblproduct and second field type LONGVARBINARY ProdImage where images will be stored.

If you can answer just small clarification question?
If Report is created on fly what is its data source in pervasive database?
Can it be view, can it be stored procedure. And finally if report source is one of those mentioned can I see it in report design and can I change it?

One time again Thanks a lot.
0
 
LVL 29

Expert Comment

by:Bill Bach
ID: 24195729
Yes, v9.5 supports BLOBs or LONGVARBINARY fields, too.
Yes, use the ID and the image field -- that's it.
As far as I know, you can source a CR report on a View -- that would be the easiest way to link the two tables and make it transparent to the person creating the reports.  Alternatively, you can link them with a JOIN in the source data definition for the report.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

873 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