Solved

Crystal reports and databses

Posted on 1998-11-03
5
180 Views
Last Modified: 2010-04-30
I have a database with several tables and I need to point a crystal report to a specific table in that database at runtime. anyone know how to do this? thanks in advance :)
0
Comment
Question by:jalleman
  • 2
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
advancefiber earned 50 total points
ID: 1443009
You have to point your report to the same table in both design and runtime. Is that what do you want? If yes, it's easy. Just create a new report in Crystal Report with their wizard. Otherwise, it's not easy. You need to create several reports for different tables and use a data control in code to link table and associated report together in runtime. There are special chapters in Crystal Report help file about how to create this kind of data  bund reports.

Good luck.
0
 

Author Comment

by:jalleman
ID: 1443010
Well not exactly what i need. I create the database and tables at runtime, I don't know how many tables I have to create at design time, only at runtime. All the tables have the same layout and properties, just different data. So i can't create crystal reports at design time as the tables do not exist at that time. I tried linking the crystal report to a data control at run time and pointing the data control to one of the tables, but couldn't get it to work. thanks for you answer tho.
0
 
LVL 1

Expert Comment

by:advancefiber
ID: 1443011
It's can be done if all tables are the same. You need to create one table in design time and link it to a data control. Then create a report according to this table's structure. In run time, point to this data control to the correct table by modifying its recordsource property. I think it will work.

But if you do not know the structure of table at design time, I do not think you can use crystal report. You may need to create your own report by using Printer control at run time.

0
 
LVL 7

Expert Comment

by:Inteqam
ID: 1443012
?
0
 

Author Comment

by:jalleman
ID: 1443013
What i ended up doing was creating a temp table at design time and creating a crystal report linking to that table. Then at runtime populating that temp table with current data and then running the crystal report via a component. also the table structure never changes so populating the temp table was not a problem.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now