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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Report by VB?

Status
Not open for further replies.

Fekri

Programmer
Jan 3, 2004
284
IR
Hi,


do you have any sample vb code to make report?

I want to be able the users to make report by themself

thanks
ali
 
Why? This is a challenging solution to provide for your users. You can use code with CreateReport() and CreateReportControl().

If the goal is to allow users to create queries and display results there are more efficient solutions.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks

It is good idea for me but

I don't know how to use it.

I checked in access help and I found this example but

I don't know how I can made complete report with some option for user and how to use the report template?
I have to make the local language option for the users to select the fields of the tables which they want..

Ali

 
I doubt you will have much luck attempting to use CreateReport() etc.

Consider using the query by form applet found at This solution can be implemented by importing some objects and creating your datasource queries.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
The "CreateReport" (ans / or "CreateForm") are not all that difficult, and a few (simple but working) examples are found in these (Tek-Tips) fora. The more difficult issue is to generate a suitable recordsource based on yhour users knowledge / understanding of the BASIS of relationsl databases.




MichaelRed


 
Thanks to all,


But can you guide me to see some eample vba code which can create the report?

because I never try to create the simple report by vba.


thanks
Ali
 
Ali,
Can you tell us why the query by form applet that I suggested won't work for your users? I would not want anyone to spend time coaching you through using the CreateReport function of the very simple and flexible QBF applet might meet all of your requirements.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Duane,

I couldn't understand what is your mean?

But let me explain more:

The users should make several report, because thier job is to monitoring the several job on the contractors.
So its need to make easy way for the users to make any different paper report by themself.

it's need in one form to adjust which fields of which tables should be in report?
what is in report header and footer?
how to summurise and summurise which fields?
or
create formula by users for some fields.

So, I think I can make recordsource through the form but the problem for me is I never make report with vba with information which user made in the form.

thanks
Ali
 
My preference would still be to create some basic reports that allow users to filter and sort based on selections on a form. I would also add the query by form applet for requirements that aren't met by the basic reports.

The query by form is a couple clicks from pushing records to Excel where users can add headers, totals, and other formatting that would be almost impossible without a great deal of work with CreateReport().

I can't help you through using CreateReport() since I generally help from experience or create samples as I work through my replies. I have a feeling this type of solution would be beyond your programming skills. I haven't heard of any Access MVP who implements CreateReport() in their applications.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top