Report name changed Results

My application generates several different reports which must be archived for historical purposes. Currently I create the reports manually and save each one with the following format:

012701ReportName.doc

(or .rtf, .xls etc.)

I have a command button on my form which will save my report, but right now it will only save it as "ReportName.rtf" and each time I click the button, it overwrites the previous report without prompting me for a new file name.

How can I put a specific date (i.e. the week-ending date) in front of the report name when I output it? I would like Access to automatically date the report based on the last day of the current week, if possible.

Thank you!
Kelly Smith

[This message has been edited by KellySmith (edited 01-29-2001).]

Hello,

I would like to create a text box which automatically prints the name of the report in the report. This is the report name as shown in Access, in the reports area (example rpt_monthly_sales).

I don't just want to type the name in, since I may change the report name at a later date, and also if I do this once then I can copy the text box for use in other reports and have it automatically be correct.

Any help would be most appreciated.

Gordon

I have some code that sends the report name (me.name) to another function. I wanted to change the name of the report, so I right-clicked it in the navigation pane and renamed it. Now my code throws an error that it can't find the report with the old name because it apparently isn't passing the new name. I can't find a name property in the property list for the report. What am I missing?

Hi
I had just finished the designing of database and i have done a silly thing now. I have renamed a report and now the data which i am entering in the forms are not reflecting in report. The report is made from a query, i have checked the query, the data is entering in the query but not reflecting in report. Please help.

When I change & remame a Report the object (Report) name changes in my Navigation Pane, however when I open the Report the "tab" still remains the same as the original Report name. Does anyone have any idea how to rectify my delimna?

Thanks...

Greetings,

I have searched the forums, and can't seem to find the solution to my problem.

I have a form for each customer, and a subform for jobs done for them. Each customer can have an unlimited number of individual jobs. I have designed a report which prints a job sheet for the customer, showing the relevant address info and such, which also prints the jobs sorted so the most recent job is printed at the top of the report.

Currently, I have a button that opens the jobsheet query, and another button to print the jobsheet report. To print the job sheet, a user has to run the query, go into design view, put in the customer's first and last names, save the changes, then print the job sheet report.

This is a tiny bit too cumbersome for folks to put up with for long. What I would like to do is have a button to press that would print the current customer record with all the relevant job records.
I have tried putting in some of the code that folks have recommended to others asking similar questions to mine, and I get syntax errors that I don't know how to fix. Currently my non-working button code is:

Private Sub Command79_Click()
DoCmd.OpenReport"[JObSheetReport]",,,"[CUSTID]="&Me.CUSTID"
End Sub

where CUSTID is the numeric primary key for the customer. (Yes, the report name is really spelled like that... :-| )

I have very little experience with Visual Basic, and would appreciate any light you knowledgeable folks can shed on this matter!
Thanks in advance,
Rowena

I have numerous reports that are used for different clients. At the top of each report is says the client's name. Everytime I run the reports for a new client I need to go into each report and change the name which takes about 2 hours. Is there a way to make some type of global change somewhere and only have to change it once??? I cannot use subreports because the reports are pretty simple and my boss wants to keep them that way. And I cannot use forms because I dont want to users to have to input anything.

Thanks,
Kate

I have over 50 reports that need to run each month. Some have data, others do not. On the "on no data" event in each report, I've created a procedure that enters the name of the report in a separate table that tracks which reports did not print. Here is my code:

Private Sub Report_NoData(Cancel As Integer)

Flag = 1
Dim dbs As Database
Dim rst As Recordset

Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("tblPrintedReports")

If Flag = 1 Then
rst.AddNew
rst!ReportName = "John Doe"
rst!PrintDate = Date
rst.Update

DoCmd.CancelEvent

End If
End Sub

Right now I have to change each of the 50 reports to reflect which name I want stored in the table i.e.,. rst!ReportName = "John Doe" and on the next report it will be rst!ReportName = "Jane Smith", etc.

I can't seem to figure out how to populate a control with the actual name of the report, i.e., rst!ReportName = (Name of CurrentReport)

Any help will be much appreciated!


I have a crosstab query and a make table query that runs off the crosstab. It is run to show the daily data for a week at a time. The user enters start date and end date on the crosstab.

I need a report off the table made with the 2nd query that shows each days data. The column names change each time the query is ran, because the dates change with each run.

How do I get textboxs on the report to reference the new dates? Have looked at other posts on dynamic controlsource for textboxes and looked at sample database but still don't understand the sytax.

The column names are changing with each run- how do you set the report to be dynamic as well?

I have a report header which always used to come out as a separate front page with my Customer Name headers starting on the next page and forcing a new page before each section. Since converting from version 97 to v2002, the report header is coming out on the first page with the Customer Name header appearing below it, not on the next page. I have checked all the Group headers and played around with the properties for forcing new pages but nothing works. I have had to remove the report header temporarily so that the users can print off the report to send out, but would like to know whether there is anything I have missed or are there additional properties I need to set?

This will affect loads of reports in the database where there is a front page with text on it

I have a report with subreports contained in it. Each subreport gets it's data from a different table.

I noticed subreport 1,2,3,4 are pulling the data from their corresponding tables. However, subreport 5,6, and 7 are pulling their data from the table relating to subreport 1.

I've checked the subreports themselves. They are referencing their own tables if I open them individually but not when opening the main report.

The report names all seem to be correct.

I've never seen anything like this before. Does anyone have some ideas??

Thanks.

can this be done?

I have an adresbook report wich, depending on the filter, the user can view (same layout, only different content)

Now I want to change the report name depending on the filter.
I created an unbound textbox in the report header. I tried to change the value of this when opening the the report. But I never get my text in there.

Reports_radresboek.txtrpttitle.value = " My report title"
DoCmd.OpenReport stDocName, acPreview, , strWhereCondition

does anyone know?

Alaric

Hi,
The below code has comments. And my problems are mentioned there. I will appreciate any comment or solution. Thx.

'This command button is placed on a form and is used to open a report. The report is named as PEOPLE_REPORT.

Private Sub SHOW_PEOPLE_REPORT_Click()
On Error GoTo Err_SHOW_PEOPLE_REPORT_Click
Dim myReport As Report

'Set myReport = Reports!PEOPLE_REPORT
'When I try to assign my report to the object variable, I encounter the below error message.
'The report name 'PEOPLE_REPORT' you entered is misspelled or refers to a report that isn't open or doesn't exist.

'Then I thought that if I used the name of the report as displayed in Project view, I might overcome the problem. And my next trial assignment is below.
'Set myReport = Reports!Report_PEOPLE_REPORT

'Again the same error.
'The report name 'Report_PEOPLE_REPORT' you entered is misspelled or refers to a report that isn't open or doesn't exist.

'Finally I used the below assignment, Msgboxes and report are displayed.
Set myReport = Report_PEOPLE_REPORT

MsgBox "myReport.Caption: " & myReport.Caption

MsgBox "myReport.RecordSource: " & myReport.RecordSource


'After I have overcome the assignment problem, I tried to change the Record Source property in order to assign a dynamically created SQL string. Originally, report uses the PEOPLE table as the Record Source.

'myReport.RecordSource = "SELECT OID, PERSON FROM PEOPLE WHERE PERSON = 'Mike'"

'When the above part is uncommented, I have the below error message.
'You can't set the Record Source property in print preview or after printing has started.

'However, there is such a situation that the original MDB and MDE files are functioning OK, before modification. And in the original file, the previous coder had also used "Set myReport = Reports!PEOPLE_REPORT" and "'myReport.RecordSource = "SELECT OID, PERSON FROM PEOPLE WHERE PERSON = 'Mike'" statements. I just modified the SQL string, I saved the code. And when I open and press the related command button, I have the below situations and error messages.

Dim stDocName As String

stDocName = "PEOPLE_REPORT"
DoCmd.OpenReport stDocName, acViewPreview

Exit_SHOW_PEOPLE_REPORT_Click:
Exit Sub

Err_SHOW_PEOPLE_REPORT_Click:
MsgBox Err.Description
Resume Exit_SHOW_PEOPLE_REPORT_Click

End Sub

You probably should cut and paste this into Word so the columns below align

I have a problem with a report. I have set up a generic process to compare any two files. After loading the files into an access database I run a series of generic queries and they identify any difference in any pair of records and displays both of the fields. Missing records are taken care separately.

To avoid running 30 different queries, I would like to put them in a report. I am using sub reports and cannot get them to work I have 2 problems:

1) When I open the detail section up enough to insert the sub report, it causes the query returns on the main report to be spread far far apart (spacing 6-10 lines apart) It’s almost as if I need additional detail lines for each sub report. How can I solve this?
2) Even though the second report will function on its own, when I insert it into the Main report, it cannot find its column (The field). I have opened up the properties of the first subreport (field 2) and set the sources equal to the MAS.FIELD2, and it still doesn’t work.
What am I doing wrong?

Database, query and report layout below (seven records on each file)


MAS file IVT file MASID and IVTID are keys

MASID Field1 Field2 Field2 IVTID Field1 Field2 Field3
1...........A1.......B1........C1..............1.. .........A1.......B1........C1............all fields match
2...........A2.......B2........C2..............2.. .........A2.......XX........A2.......... second field does not
3...........A3.......B3........C3..............3.. .........A3.......A3........A3............all fields match
4...........A4.......B4........C4..............4.. .........A4.......A4........YY............third field does not
5...........A5.......B5........C5..............5.. .........A5.......A5........A5........ ...all fields match
6...........A6.......B6........C6..............6.. .........ZZ.......A6........A6 ......... first field does not
7...........A7.......87........C7..............7.. .........QQ......A7........A7............first field does not

All of the queries are as follows: (If the indexes match, do the corresponding fields match?)

SELECT MAS.MASID, MAS.Field2, IVT.Field2 < ======= The name changes from
FROM IVT, MAS Field1 to Field2 to Field3 etc.
WHERE (((IVT.IVTID)=MAS.MASID) And ((IVT.Field2)MAS.Field2));

Query 1 (FIELD 1) MASID MAS.FIELD1 IVT.FIELD1
looks like this..........................6................... A6....................ZZ
...........................................7...... ..............A7.....................QQ


Query 2 (FIELD 2) MASID MAS.FIELD2 IVT.FIELD2
...........................................2...... ...............B2.....................XX


Query 2 (FIELD 2) MASID MAS.FIELD3 IVT.FIELD3
............................................4..... ..............C4............ .........


The report I want should somehow report on all the results.

Probably like this: (unless you can think of a better layout)


REPORT TITLE

MASID MAS FIELD IVT FIELD

FIELD 1..................6....................A6........ ...............ZZ
............................7....................A 7.......................QQ

FIELD 2.................2......................B2....... ............... XX

FIELD 3.................4......................C4....... ................YY


If I can leave off the report, a Field Line where the data is the same in both files, that would great.

Hello. English is not my first language. So pardon me if I'm not the clearest !

I have a table that has the infos about the schedule of nurses.

The table is like this :

NAME / FIRTS_NAME / DATE / START_TIME / END TIME

Every name has some workshifts.

I made a report with the wizzard. The report lists all the workshifts of a person in the table.

But how do I make the report start a new page when the person's name changes ?

Or how can I have a workshifts report for each person ?

I am generating a report in MS-Access which has many fields. I want to sort the report by different fields at run time, but do not know how ? At design time,I am able to set the different sort by order field name.

Any help will be appreciated.

Hello,

I have some complex reports which are giving me some real hassle.

The process is this:
In a form, they pull down a report name in a drop down box, then a print button appears.
That button will append all needed records to a table called "tblVisual" using an append query, and edit every record in one column to be the same using an update query.
The report then opens, with the record source as a quesry doing all the mathematics etc.

As 2 of the reports were pretty much the same, i duplicated everything and just changed the query.

I changed the RS of this duplicated report and saved it. When i ran the process, it opened up with the old record source.

When i go into design view and change it, i cannot close the report, or the dabase window, or the forms, or access! Nothing will close at all!!

Really frustrating the hell outta me!

All -

I have a Report Selector form that's laid out with a Drop-Down Combo Box that selects that name of a report and is populated by a table called tblReports.

I have two listbox's on the same page and two text fields that are used to filter by date.

The two listbox's rowsource is based on the selection made in Drop-Down Combo box. The tblReports table contains the report name, the actual name of the report in Access, RowSource for both Listbox's and an Yes/No field for whether or not the Date range can be used to filter.

I need to figure out how to filter a report based on varying rowsources in each list box. Each report is setup to be filtered a specific way, I'm just not sure how to get the selections in the listbox's to each report without using a lot of VBA that isn't dynamic in nature.

Any ideas how to create a report selector/filter when the report name is changed AND the listbox's with different criteria are changed as well?

Could use ANY help!

I have a problem.

At the moment I have a report that collects various data from query and 2 calender controls. Basically I have a macro button that is used with 2 calender controls. Once I select the Date From and Date to I then press the macro button to print a report - and that all prints fine.

On the top of my report I have the below code:

=Format([Forms]![datecal].[caldatefrom],"mmmm dd yyyy") & " - " & Format([Forms]![datecal].[caldateto],"mmmm dd

This code allow Access to display the date range of the report. eg November 1st 2008 to November 18th 2008. However, this only works when the macro is ordered to print directly. If I set it to print preview and then print I get '#name?' where the date should be.

Now, I need to make a change to my database that results in this report being emailed to the relevant people rather than printed. I would like it to go in .PDF format, and I've found that to do that I will have to set the macro as 'Print Preview' and then print to PDF printer and save file to desktop, but I still get that '#name?' error message when the file is saved.

Is there any way to combat this?

Thank You

Would like some help on how to output my Access report to a PDF file..

When I do it manually, I select Preview Report, then change the Printer Name to Adobe PDF (as I have had the version of ADOBE that allows for this).. and then click OK. I am then prompted for a location which I enter and it prints the report data as an ADOBE file.

I looked at docmd's: OpenReport and Output To, but they don't have a place where I can change the printer from my default (which is on a network printer) to the PDF selection..

btw, the intrinsic constants for Output To are:

HTML, IIS, RTF, TXT, and XLS. Are there more, can I add PDF?

Any suggestions?

Thanks..


Not finding an answer? Try a Google search.