473,503 Members | 12,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show name in the report header

75 New Member
I want to print a report in Access, where I can show the name on top the report when user enter name. please take a look.

I have this so far in the header of the report

Expand|Select|Wrap|Line Numbers
  1.  
  2. =Forms!RunReport!Pharmacist.Value
  3.  
  4.  
I want something like that

"Interventions by location by "Pharmacist Name"


Expand|Select|Wrap|Line Numbers
  1.  
  2. PARAMETERS [Enter Pharmacist Name] Text ( 255 ), [Start Date] DateTime, [End Date] DateTime;
  3. SELECT Intervensions1.Location, Count(Intervensions1.fldID) AS CountOffldID
  4. FROM Intervensions1
  5. WHERE (((Intervensions1.Pharmacist) Like "*" & [Pharmacist] & "*") AND ((Intervensions1.Date) Between [Start Date] And [End Date]))
  6. GROUP BY Intervensions1.Location;
  7.  
  8.  
Sep 25 '07 #1
5 1600
mlcampeau
296 Recognized Expert Contributor
I want to print a report in Access, where I can show the name on top the report when user enter name. please take a look.

I have this so far in the header of the report

Expand|Select|Wrap|Line Numbers
  1.  
  2. =Forms!RunReport!Pharmacist.Value
  3.  
  4.  
I want something like that

"Interventions by location by "Pharmacist Name"


Expand|Select|Wrap|Line Numbers
  1.  
  2. PARAMETERS [Enter Pharmacist Name] Text ( 255 ), [Start Date] DateTime, [End Date] DateTime;
  3. SELECT Intervensions1.Location, Count(Intervensions1.fldID) AS CountOffldID
  4. FROM Intervensions1
  5. WHERE (((Intervensions1.Pharmacist) Like "*" & [Pharmacist] & "*") AND ((Intervensions1.Date) Between [Start Date] And [End Date]))
  6. GROUP BY Intervensions1.Location;
  7.  
  8.  
You could try creating a textbox in your Report Header with the following:

="Interventions by location by " & Forms!RunReport!Pharmacist.Value

I haven't tested this so let me know if it works. I know this method would work if you had the prompt for Pharmacist Name in your field list for your report. I'm not sure if the above query is for your report or for your form.
Sep 25 '07 #2
pukhton
75 New Member
You could try creating a textbox in your Report Header with the following:

="Interventions by location by " & Forms!RunReport!Pharmacist.Value

I haven't tested this so let me know if it works. I know this method would work if you had the prompt for Pharmacist Name in your field list for your report. I'm not sure if the above query is for your report or for your form.
Thanks for your reply. i tried that, but it still giving me an error #Name?

NOT SURE WHATs wrong with it?
Sep 26 '07 #3
mlcampeau
296 Recognized Expert Contributor
is the above query the record source for your report?
Sep 26 '07 #4
pukhton
75 New Member
is the above query the record source for your report?

Well this is the query for my Interventions by location by pharmacist, so yes this is the record source for my report.

Expand|Select|Wrap|Line Numbers
  1.  
  2. PARAMETERS [Enter Pharmacist Name] Text ( 255 ), [Start Date] DateTime, [End Date] DateTime;
  3. SELECT Intervensions1.Location, Count(Intervensions1.fldID) AS CountOffldID
  4. FROM Intervensions1
  5. WHERE (((Intervensions1.Pharmacist) Like "*" & [Enter Pharmacist Name] & "*") AND ((Intervensions1.Date) Between [Start Date] And [End Date]))
  6. GROUP BY Intervensions1.Location;
  7.  
  8.  
Sep 26 '07 #5
mlcampeau
296 Recognized Expert Contributor
Well this is the query for my Interventions by location by pharmacist, so yes this is the record source for my report.

Expand|Select|Wrap|Line Numbers
  1.  
  2. PARAMETERS [Enter Pharmacist Name] Text ( 255 ), [Start Date] DateTime, [End Date] DateTime;
  3. SELECT Intervensions1.Location, Count(Intervensions1.fldID) AS CountOffldID
  4. FROM Intervensions1
  5. WHERE (((Intervensions1.Pharmacist) Like "*" & [Enter Pharmacist Name] & "*") AND ((Intervensions1.Date) Between [Start Date] And [End Date]))
  6. GROUP BY Intervensions1.Location;
  7.  
  8.  
If it's your record source for your report then if you change the query just slightly so that your parameter will show up in your field list for your report, like so:

Expand|Select|Wrap|Line Numbers
  1. PARAMETERS [Enter Pharmacist Name] Text ( 255 ), [Start Date] DateTime, [End Date] DateTime;
  2. SELECT Intervensions1.Location, Count(Intervensions1.fldID) AS CountOffldID, [Enter Pharmacist Name] AS NamePrompt
  3. FROM Intervensions1
  4. WHERE (((Intervensions1.Pharmacist) Like "*" & [Enter Pharmacist Name] & "*") AND ((Intervensions1.Date) Between [Start Date] And [End Date]))
  5. GROUP BY Intervensions1.Location;
Then you should be able to put this expression in your textbox on your report:
="Interventions by location by " & [NamePrompt]

As I mentioned before, this method has worked for me in the past, but the way I've used it in the past, I've needed my prompt to be in my field list.
Sep 26 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3285
by: Roger | last post by:
I couldn't find anything at http://www.mvps.org/access/reports/index.html I have a report with static (name, address, etc) in its report header and a subreport in the report's detail section ...
7
1781
by: Anne M | last post by:
I have a report based on query..which is a team list with names and their role on team ie coach, assistant and player. Report is almost what I want and my knowledge is limited so I need some...
2
14103
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002...
3
4957
by: TomislaW | last post by:
I am sending word document with e-mail from asp.net 2.0 application. I read doc file like this:FileStream fs = System.IO.File.Open(docPath,FileMode.Open,FileAccess.Read,FileShare.Read); Then...
4
1495
by: vsts2007 | last post by:
Is it possible to put the report name in the header of the report. i created pay slips in access and i want to put report name in the header of the report created.
2
3586
by: NicholasSerpentine | last post by:
Hi folks....I have been checking out this group and have found help and solutions to everything I have needed up to this point. I have created a report based on a Query to show me certain activity...
2
2893
by: Simon | last post by:
Dear reader, In case a report is a sub report the Report Header of the sub report is printed in the report but the Page Header of the sub report will not be printed. This is the same for...
0
1996
by: roverturf | last post by:
Is there a way to show a subreport's header if the subreport has no data? On a work order report (rptWorkOrder), I have two subreports, one for parts charges (subreportParts) and another for labor...
7
2067
by: DThreadgill | last post by:
Don't know if this can be done or not but I'm sure the gurus here will let me know ;) Got a .csv file that is being imported into a table using specs. The table consists of the following: Issue...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
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
7364
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
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.