Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reports- problem saving to different files 1

Status
Not open for further replies.

Ricky1946

Programmer
Jul 11, 2001
76
GB
Hello,
I have a problem with printing a report (invoice) which is linked through a sub-form to a form which contains the customer details. The first one I create is fine, but when I create a second one, even if its for another customer it copies to the second page of the same report and so on. So if I want to view or print a particular invoice it opens to the first page and not the 5th or 10th or whatever page the relevant invoice is on. How can I get it to save each report to a new report document and not to the next page of the SAME document. I am sure there is something obvious I am doing wrong.
Cheers
Ricky

"To say 'thankyou' encourages others."
 
so when you are previewing an invoice are you saying in your query for the report just to show that particular invoice that you require, or all of them.

The way you described it seem you are viewing all of them instead of just one invoice at a time.

You would need to link the reports query to an ID field on your main form for the invoice number.

If you are unsure how to do this please let me know your unique ID number field for each invoice which would be on the form that you run the report through.

Hope this helps.
 
I have two tables. One is CustomerTBL and the other is InvoiceTBL. They are linked via the CustomerID field. I also have a Customer form and an Invoice sub-form. The invoice sub-form works fine on the screen but as soon as I try to preview/print the invoice (report), It chooses the first invoice report. the ones that follow are on pages 1, 2, 3 etc. in one file.
Thanks for you help.
Regards
Rick

"To say 'thankyou' encourages others."
 
So let me get this correct you have a report for the invoices for customer, when you preview this report it displays all:-

a - all invoices
b - all invoices for the customer that is been displayed on the form

What you want to happen:-

a - when on a customer the end user display all their invoices
b - you select an invoice click on the preview button and it displays just that one invoice only.
c - display certain invoices of the user choice, either using a date range, invoice number range etc

I am trying to get a clear picture of what you require, i think I do, but i feel you may be able to do a little but more to make the end users been able to.

I think choice "c" would be best, if you do this now it will save the end users coming back and asking for other options, you may as well give it to them now.

Hope this helps.
 
The first issue is as (a) in your first question - I view all invoices in one workbook.

The second question I really need (b) in the first instance because having created the invoice the customer needs to click a button to print it to send off.

After that (c) would be a good thing for the customer to be able to do at a later date.

What might be an ideal thing is to output it to a Word document (not Rich Text Format as this leaves out the settings and the Customer logo) so that it only picks up the one set of details into the form of a letter. I think perhaps I am trying to do something that Reports are not designed to do.

Regards

Rick

"To say 'thankyou' encourages others."
 
This is easily done through report, but when you have asked to output to Word instead of rtf, it looks the same appart from having ".doc" at the end of the file name. To get the graphics, and if you use subform within your report etc to display you would be best outputting this to PDF.

You can automatically get access to assign a filename, i have all the code for this which i can give to use. All that you need to make sure of is that you have PDF Writer installed on the PC.

If you are viewing just the company invoices that the use is currently on then you must have some code within the reports query to only display this.

You would need to write some code on your main form when the user selects an invoice from the subform that it populates this invoice number into an unbound field within the main form. This would not be display, but hiddden an only used for the report query so you are able to only view the one that you need.

If you can let me know the name of your field within your subform and what your subform is called. And i will be able to write the code for you. And then let you know how to alter the query within the report.

Hope all of this makes sense if not please let me know.
 
M8KWR
Thanks. I will take a look and get back to you.
Regards
Rick

"To say 'thankyou' encourages others."
 
M8KWR,
Hello again.
I have solved the problem. It was a case of not seeing the wood for the trees. I had to take a break and stand back and have a look and the answer came to me - I had not referenced the query to look at the data in the form to sort to that specific customer. Simple!! but so frustrating. I thank you for your very valuable help. If you want another poser please see my latest posting entitled "Problem with updating parts table from a loop".
Thanks again, I have given you two stars.
Regards
Ricky
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top