Page Headers in ReportViewer Report Displaying A Variable - reportviewer

I am trying to add the variable SName to the report header. I copied this =First(ReportItems!SName.Value) after reading this http://msdn.microsoft.com/en-us/library/ms252093%28VS.80%29.aspx and it works on the First page of the report.
However, on the second through penultimate page it becomes blank (i think because the textbox Sname doesnt appear on the page anymore) and then on the last page it displays Blank.
I need the value from the textbox SName to appear on every page of the report.
Any ideas are much appreciated.
Thanks
Philip

OK I had to make a textbox which I set hidden=true and held the value so that the information would be present on each page, yet not visible to the user, ugly but it works. =ReportItems!SName.Value where SName is the name of a textbox which is hidden.

Select the TextBox Properties, in the General Tab check "Repeat report item ..." option and then select Data Region. It Works!!!

Related

How to mimic values in multi page SSRS Report

I need a lab report that has several pages. Each test has a unique reference number and I would like it to appear in the header according to what I have on the page. At the moment I only see one reference number and it remains unchanged after switching to another page. See attached image.
If possible, I would like to get rid of the SampleNo column so that its value is only in the header
The easiest way to do this is to reference the the textbox in your tablix that contains the "Sample No.".
Click the textbox that you have highlighted in the tablix, show the properties window (F4 in Visual Studio - can't remember in Report Builder, I think View/Properties).
Find the Name property of the textbox, this is often the name of the field it contains but not always.
In the example below the textbox name is 'oYear`
Next, set the expression in your header to be something like
=FIRST(ReportItems!oYear.Value)
Change oYear to whatever textbox name in your tablix is.
ReportItems refers to the rendered object name so here we just get the first on each page.
Here the first two pages from a small sample of data which groups by year.

MSAccess VBA: Pass values from a subform to a seperate form

I have a form frmDetail that contains several locked fields I want populated only when another form has been filled out, in the name of having some kind of standardization in my data. This other form frmSignOut is used to enter in a date and location that will populate the fields on frmDetail. frmSignOut also contains a subform subULookup that looks up users from a different table using an identifier number. The resulting last name, first name and phone # should also be passed to frmDetail. I also hope to combine first and last name somehow into a Last,First format.
My approach so far has been to open frmSignOut modally with acDialog and I inserted Visible=False into the On_Click event on frmSignOut. Then I try to reference my subform fields and set them to the desired fields on frmDetail. I finish by refreshing and then closing the dialog form.
Private Sub CmdSignOut_Click()
DoCmd.OpenForm("frmSignOut"),,,,,acDialog
If CurrentProject.AllForms("frmSignOut").isLoaded=True Then
Set Forms!frmSignOut!SubULookup.PhoneNbrTxt=Me.ContactNbrTxt
DoCmd.Close (acForm), ("frmSignOut")
Me.Refresh
End If
End Sub
I have only been able to get this far, trying to pull the first field PhoneNbrTxt. I can get frmSignOut to open, I put in data and when I click my 'close' command button I get run-time error 438: Object doesn't support this property or method.
The line highlighted is where I try to reference my subform field. I also have a 'Cancel' button added to frmSignOut that just closes the form, I have no errors there.
Again I'm completely new to Access without much prior experience in anything related, I'd appreciate any knowledge you guys can throw at me.
EDIT: I've been able to successfully pull the value to Me.ContactNbrTxt by adjusting my code to the below.
Me.ContactNbrTxt = Forms!FrmSignOut!SubULookup.Form!PhoneNbrTxt
It looks like the missing part was the Form! right before the control name, along with formatting this correctly and dropping Set.
Im still trying to work out how to combine first and last name before also pulling those to frmDetail, if anyone can help there.

MS Access: text box value show #Name?

I have created a form and set the form's RecordSource to a query. Below is my query:
SELECT GeneralT.*, SalaryT.[Status]
FROM GeneralT INNER JOIN SalaryT ON GeneralT.Deposits = SalaryT.Deposits;
In the form I have 4 textboxes. In the first 3 textboxes I show value from GeneralT table and in fourth textbox I show SalaryT.[Status] value. But this fourth value doesn't show in the textbox rather it show #Name?.
If I open the query in datasheet view I can see all the value properly. I don't understand what is wrong here. Please help me to show the result properly in the form.
Displaying #Name? for a field says that field has a control source that does not match with the query linked to the form. Some things to check:
Make sure Status is a selection from one of the pre-existing options in the Control Source drop down combo box. Click on the combo box to make sure.
Double check to make sure it is a "Text Box" and not a custom
control.
Make sure there isn't another text box named Status
Try chaning the control source to just Status instead of SalaryT.[Status]. If the field name does not conflict with the naming of a field in GeneralT, the selected SalaryT.[Status] will actually be displayed named Status.

MS Word 2010 template text form field condition

we got a word template that gets a mail feed from SQL.
It has three text form field :
txtFirstname
txtLastname
txtcompany
If the feed has no firstname and lastname i.e blank and has a company name then
the company name needs to be moved to the txtFirstname field. hence moved to the left. Aligned to the left.
Text form field control is in Developer\legacy forms\text from field
I guess need code to run macro on exit in the txtcompany field...
When they are blank they should just have a space inside the container, so they should automaticaly move to the left if the others are blank. Are there any styling applied to them? Also make sure they are not in a table, as it wont move.
Hope this helped - Jim

Access VBA: Attachment image won't load in form

I have a table that contains items, their location, and an attachment photo of the item. The location is set up by row #-shelves #-shelf #. For example 2-3-4 would be in the second row on the third set of shelves on the fourth shelf down. I have another form that allows users to search by shelf. Basically, they enter the first two numbers and I do this.
DoCmd.OpenForm "fReview", , , "Location Like '" & locStr & "*'"
Where 'locStr' is the string containing 2-3 (the first two numbers), and when the form fReview opens, it should show all items on all shelves of the second row, third shelf unit.
This part works just fine. However, when fReview opens, the image part of the attachment field that I put on the form stays blank. The rest of the fields populate with no problems. When I close the form and open it again normally (with no Where condition), the image works perfectly (although it does blink a few times like it is refreshing multiple times which is weird). The form is linked to the table, so it should all be directly linked, so I don't know what's happening.
So, I created a brand new tiny database to test some things, and figured out my problem. Thought I'd share it, just in case somebody eventually had the same problem I did. It was actually pretty simple.
When I added the attachment field to my form, I just dragged it over from the "Add Existing Fields" bar. This linked the Attachment.FileData as the control source for the field, which seemed ok. Turns out that that isn't right for some reason. If you change the control source to simply be the field name, it works.