473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

How to change the table name in a report?

I have reports formated and now need to use that format on another
table name with the same field names as formated in the report.
I belive it is in the properties but I can't seem to find it.
thanks

Nov 13 '05 #1
6 6135
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).

Nov 13 '05 #2

<pi********@hotmail.com> schreef in bericht news:11**********************@g43g2000cwa.googlegr oups.com...
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).


Hmmm ...
Maybe also having two identical reports with only another recordsource is a bit odd ... ?

DoCmd.OpenReport "YourReportName", acViewNormal, "qryOtherRecordsource" won't do what you need?

Arno R
Nov 13 '05 #3
th***********@dva.state.wi.us wrote:
I have reports formated and now need to use that format on another
table name with the same field names as formated in the report.


Thomas, not meaning to be an ogre but this is stupid, stupid, stupid.
If you are going to do things this way, stick with Excel.

What you described is akin to setting a table for dinner and having your
guests get up and move to a different table for each course, because you
couldn't be bothered with picking up dishes from each course and
replacing with dishes for the next course.

Database design => 1 table, not redundant tables like you've described.
use one table and use queries to distinguish the two datasets you have
currently in two separate tables.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #4

Actually, it's not as "odd" as you might think.

Having two tables with identical structures is fairly common in
situations where there are "archived" records. Usually, the only
difference between the two tables is that one has a AutoNumber
(Yuck!), and the "Archive" table doesn't. This allows the moving of
records from one table to the other to "get them out" of the way of
"real" work.

I won't say that I endorse this solution, but I've seen it too many
times to say that it's "odd". Occasionally, I'll run into a DB where
both the "Active" table and the "Archive" table have Autonumbers in
them. <Major Sigh>

I usually get called in on these to solve the problem of why the users
can't link back from the "Archive" table.... D'Oh!
On 5 Jul 2005 09:58:31 -0700, pi********@hotmail.com wrote:
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).


Nov 13 '05 #5

"Arno R" <ar***********@tiscali.nl> wrote in message
news:42********************@dreader2.news.tiscali. nl...

<pi********@hotmail.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).


Hmmm ...
Maybe also having two identical reports with only another recordsource is a
bit odd ... ?

DoCmd.OpenReport "YourReportName", acViewNormal, "qryOtherRecordsource"
won't do what you need?

Arno R
"DoCmd.OpenReport" will not work because it will only filter the report
source.

If you are NOT using runtime, you can open the report in design mode, change
the source, save then print.
DoCmd.Echo False
DoCmd.OpenReport Reportn, acDesign
Reports("rptMyReport").RecordSource = "qryMyReportSource"
DoCmd.RunCommand acCmdSave
DoCmd.Close acReport, "rptMyReport"
DoCmd.Echo True

Otherwise change the source query before opening the report.
Nov 13 '05 #6

"paii, Ron" <pa**@packairinc.com> schreef in bericht news:mN********************@athenet.net...

"Arno R" <ar***********@tiscali.nl> wrote in message
news:42********************@dreader2.news.tiscali. nl...

<pi********@hotmail.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
Sounds like dodgy database design, but that's your choice. Having two
tables with identical structures is a bit odd...

Simple, though. Make a copy of the report. Then open it in design
view, and change the recordsource to the new table. (view the
properties tab).


Hmmm ...
Maybe also having two identical reports with only another recordsource is a
bit odd ... ?

DoCmd.OpenReport "YourReportName", acViewNormal, "qryOtherRecordsource"
won't do what you need?

Arno R


"DoCmd.OpenReport" will not work because it will only filter the report
source.

If you are NOT using runtime, you can open the report in design mode, change
the source, save then print.
DoCmd.Echo False
DoCmd.OpenReport Reportn, acDesign
Reports("rptMyReport").RecordSource = "qryMyReportSource"
DoCmd.RunCommand acCmdSave
DoCmd.Close acReport, "rptMyReport"
DoCmd.Echo True

Otherwise change the source query before opening the report.


It is true that DoCmd.OpenReport will only work when a filter is provided.
I completely forgot about this, because actually I do use filters in this case.

However my point is that one must try to prevent using duplicate reports.

One can also use code like this:
Private Sub Report_Open(Cancel As Integer)
If WhatEverCondition then Me.recordsource="NewRecordSource"
End Sub

In this case this recordsource does *not* have to be a filter on the original recsource.
Also: This works with the Runtime.

Arno R
Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sam Fisher | last post by:
Hi, I have a crystal reports hosted on the IIS as web service. Everything works fine except that I can not access the database other than the one on which the report originally created. I am...
4
by: DerekM | last post by:
I have a database project that I created with several forms and reports. I would like to be able to declare a single title and be able to change the title on all the forms and reports by changing...
1
by: fecket | last post by:
The following code is used in my db to change the sort order of the report to various fields. I want to take this one stage further and use maybe a Case Select to give 2 or 3 different options to...
7
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. I'm trying to change...
0
by: Ray | last post by:
Dear all, Now I am using the report document in vb.net to call the crystal report and I will set the database information in the report document. The code is as follow: ......
5
by: Ray | last post by:
Dear all, By using the following code, I can change the database name of the crystal report .... Dim ReportTemp As New ReportDocument ReportTemp.Load(_report) For Each table In...
6
by: Agnes | last post by:
Please help, i had completed over 30-50 reports, now. our client insist to change the database name. anyshorcut that I can change the database name in the report without re-write all of them ??...
8
by: Maxi | last post by:
Hello, i'm sorry my bad english :( I have CR9 Webservice, how to change databadse name and User_name into Webservice method? (not Viewer Control) Tks!! -- --------------------------
11
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Master Report is: Me.RowSource = "TableOrQueryName"
7
OuTCasT
by: OuTCasT | last post by:
I know how to change the database and sqlserver for a crystal report Dim report As New ReportDocument Dim connection As IConnectionInfo Dim oldServerName As String =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.