?
Solved

Crystal reports and databses

Posted on 1998-11-03
5
Medium Priority
?
186 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
[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
  • 2
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
advancefiber earned 100 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month8 days, 17 hours left to enroll

764 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