Solved

Crystal reports and databses

Posted on 1998-11-03
5
184 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 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