Solved

crystal report activex in vb

Posted on 2000-03-14
1
322 Views
Last Modified: 2010-05-02
I'm using the crystal report activex to run a report on accesstables.
Using de datafiles-property I can change the drive, path and .mdbname.  Can I change the name of the tables too ?
Per year I have an ordertable.  Depending on the users choice I have to print the report based on table ordr98 or ordr99 ...
0
Comment
Question by:pce
[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
1 Comment
 
LVL 5

Accepted Solution

by:
Voodooman earned 150 total points
ID: 2616927
No you cant! Because CR doesnt allow you to change the field and table names. You can  

But what you can do is use a temporary table for your report.  Before you run the report run an Append query to append the records you want from the table of your choice to the TEMP table.

After running the report delete the recs from the TEMP table.

in VB
Dim db as database
Dim rs as DAO.Recordset

Set db=opendatabase("C:\Mydir\Mydatabase.mdb")

db.execute "Append mytable.[Field1]...etc

Report.action=1

DoEvents

db.execute "Delete from MyTable.....

Good Luck

VoodooMan!
0

Featured Post

Industry Leaders: 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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 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…
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…

756 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