List of Reports to View or Print Options (1 Viewer)

Czeszyn

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2014
Messages
128
Okay, jdraw i switched to Chrome and was able to down load it. I will look it over and and get back to you tomorrow. Thank you very much. Hey, is Chrome better than IE?
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:29
Joined
Jan 23, 2006
Messages
15,393
???Chrome, IE???? I use Firefox mostly. But I use the others if I need a secondary browser.
 

Czeszyn

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2014
Messages
128
Wow, jdraw that is totally awesome. How would you build that normally? Okay, now with that in place, is it possible to just show the reports for that client? Right now it shows all reports including the graphs that do not need to be shown. Also, can I put a pull down menu for each client, so that I have 15 clients and each one would have their own pull down to see their reports, and can this be on the same form you have sent me? But this is so cool.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:29
Joined
Jan 23, 2006
Messages
15,393
look at Markk's post #8 for an approach.
 

Czeszyn

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2014
Messages
128
Would I use that instead of what you have sent me?? Markk, I would create a table that I would name the reports, and have a link to them, then create a form then put a combo box on it that would link to that table?? How would I be able to choose either print or preview as in yours?
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:29
Joined
Jan 23, 2006
Messages
15,393
You create a table to contain the names of the reports you want for your selection list.
Use that table or a query based on that table as the rowsource of your combobox.
 

Czeszyn

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2014
Messages
128
Okay, I made a table and called it tblClientReport. The fields are, ClientReportID, ClientID (which is linked to the customers and lets me chose the client), and ReportName. Here is an example of what I have so far:
Yangfeng - Cluster C489 , another Yangfeng - Cluster C489 Molding 1 shift, and etc. So now how do I make it work. I will have more clients and more report for those clients. So how do I put this together to work where I can chose a report to either view or print? Would I be able to use jdraws set up?
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:29
Joined
Jan 23, 2006
Messages
15,393
OK.
You have some Reports,
Report1, Report2, Report3,...ReportX
and you have some Clients,
Client1, Client2,....ClientZ

Clients are allowed to select certain reports, so you need to know Which Clients can Print/View which reports.

Let's say
Client1 can access Report1, Report6 and Report7
Client2 can access Report1, Report5 and Report7

You would put this info in a table(eg tblReportsforClients)

So you restrict Clients to the reports they can see
by setting the combobox rowsource along these lines:
Code:
Select Reportid from tblReportsforClients where
ClientId = yourVariableContainingTheClientID
Order by ReportName

I would use a ReportID and ReportName and ClientID in the Table.

Good luck.
 
Last edited:

Czeszyn

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2014
Messages
128
Do I put that into the form that I downloaded from you jdraw? Or am I creating a new form with new all new comboboxes? Also I did put in my table the following: ClientReportID, ClientID and ReportName.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:29
Joined
Jan 23, 2006
Messages
15,393
You can use the form I sent, but you'll have to change the rowsource of the combo.

Do a little experimenting. Try a few things. That's how you'll learn.

There are some combo box faqs and examples here.

If you get into trouble, send us some of your code and any error messages.
 

Czeszyn

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2014
Messages
128
Thank you jdraw for the site on combo box, cool site. I think I get the idea. I first need to get my table to work right. What I mean is that I had set it up like we discussed, but where the report name is at, I do I get it to link to my reports? The only hyperlink I found anything on was to set up emails and web pages. If the person goes to my combo box, I will need that to link to my report.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:29
Joined
Jan 23, 2006
Messages
15,393
Tony,

Attached is database as per PM.
 

Attachments

  • ForCzeszyn.accdb
    580 KB · Views: 67

Czeszyn

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2014
Messages
128
THANK YOU SO MUCH jdraw.

That is exactly what i was looking for. I wish you were close, I would buy you a beer or soda. Thank you so much.

When you did that, did you had to write VB code?

Thank you again so much.
Tony
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:29
Joined
Jan 23, 2006
Messages
15,393
Glad it's helpful.

Open the form in design view, click on the button and review the Click Event Procedure.
That is the code that was changed.
I adjusted the Rowsource of the combobox to supply all Report names in your database except those beginning "rpt".

Rowsource sql is
Code:
SELECT MsysObjects.Name, 'report' AS objtyp FROM MsysObjects 
WHERE ((((MsysObjects.Name) Like '~*' Or
 (MsysObjects.Name) Like 'rpt*')=False) And 
((MsysObjects.Type)=-32764)) 
ORDER BY MsysObjects.Name;

Good luck.
 

Czeszyn

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2014
Messages
128
Thanks again jdraw. This is really cool.
I put another challenge in Form. Thank you so much for your help.

Tony
 

Users who are viewing this thread

Top Bottom