List attachments in report field - ms-access

I have a table with attached files to each record, and I would like to get all the filenames listed according their records when I run a report.
For the moment, my query only displays the last filename.
Any advice?

Create a sub report based on attachment field of the record. The query of the sub report should be something like this:
SELECT Record_Id, Attachment_field_name.FileName from TableName
Link your sub report on the Record_id with the main report. Substitute with your field names.
Also have look at this related question on attachment fields How to query number of attachments from Attachment field in Microsoft Access?

Related

SSRS duplicates parent group id in CSV export

I have a simple SSRS report which shows id, description and credits.
I grouped the report by id and it when it runs it shows id, description and credits. But my end user doesn't want description and credits to show up when they export into CSV.
So i set the Data Element Output for the detail group (description and credits) to NoOutput. Now when I run the report, I only get the id but it is duplicated as many times as there is data for description and credits. So instead of 6 rows showing me only the unique ids, I get around 18 rows consisting of the 6 ids.
I only want the unique 6 ids to show up, please help me in achieving this.
What I would do is create two separate tablix. Both with different visibility settings. One will show up when you run the report, the other will show up when you export the report. The expressions will look something like the following.
For the first tablix that will only show when you run the report:
=Globals!RenderFormat.Name = "CSV"
For the second tablix that will only show in the exported CSV file:
=Globals!RenderFormat.Name <> "CSV"
Then, in the second tablix, you can just create one column (ID) and a single group to group on the ID column. You can leave your first tablix the way it is.

Access: Print selected records form query

I really don't know how to start this. I have a report, that takes records from a query. The query itself takes the records from a table. Now I want to be able to select the records in the query by the id manually. But there is no connection between the records, so I can't say 'give me all records between id x and y'. Also, there is not the count of records always changing. I want a user to be able to say: 'okay, I need to print all the data of these x ids'. how can I archive this?
you can create the object using Querydef and used this to change your query at runtime based on the user slected criteria.
try like this
Dim query_1 as string
query_1 = "Select * from Table1 where ID = 'Your ID'"
CurrentDb.QueryDefs("Report_Query").sql = query_1
than open the report or make pdf ..
You could populate a multiselect listbox from the same record source as the report, and then use the selected records from that to drive the actual report data.
You would probably want to build a PK IN(1,3,99,104...) style criteria by looping through the selected items from the listbox.

Displaying the tablix structure for No data values in ssrs?

I am working on a SSRS report in which I have a parameter with a list of names, In which a multiple value can be selected by the user. I gave title of the report using an expression where it shows "Result for SELECTED NAME" and applied page break such that each value is displayed on a new page.
But when i select all the values at a time, the report is only displaying the results for the names only for whom the data is available.
I would like to display the title as "Result for SELECTED NAME"(remember this is for the values with no data along with the values with data, each on new page) and tablix structure with a NoRowmessage.
I am really struggling on this since two days!!
Can any one help me?? Thanks Guys.
I think you should look at your query. Is your query returning a row for each name, or only rows where the names exist? If you can, change the structure of your query to return the names, left joined to your actual query.
Here's some simple code that captures the idea:
SELECT names.Lastname, names,Firstname, data.*
from (select distinct name from name table) as names
left join (previous query) as data on data.nameID = names.nameID

InfoPath 2010, read & write to Access 2010

I have an InfoPath 2010 form that I've created to submit data into an Access 2010 database. One specific element being captured is an employee ID. So, the database may have multiple records of the same employee ID.
I have a second table in the database, that contains every employee ID in one column and their name in another.
If the user is creating a record for employee ID 987, how do I add a textbox to this form that will read the corresponding name found in table 2?
Thank you,
Jeff
Here I am using this procedure in fetching data from list. Try whether its working for Ms Access
If you need to fetch data using infopath2010 then use following condition
In the Rules add Action
Under Run these action add Set field value
In field box select where fetch details wand to display (i.e which txt box)
Click Calculted value (fx) in value
In that click insert field or group and select Show advance view
Under field select which table you need to fetch the data
Select the field which you need to display in the selected txt box and using filter condition filter the data using secondary table employee id= employee id in main field
Secondary table will visible in infopath form only if you get connected with that using manage data connection in infopath

How to select multiple records and change their value at once

Here is my problem and I do not know where and how to start to search about this.
In a MS Access database users will have a list of records returned from a query. Let's say employees which are active (employed). This table has a related table let's say departments (related through departmentID in both table).
What I want to do is to make form (or something else which would do the same job), where user will select some records (probably with checkboxes associated with each record) and there will be a single combobox with department names. When user selects a department name, its departmentID should be saved into departmentID field of these records.
I have created a form with a query of active employees (form with multiple items). And put an extra field in Detail section with a checkbox. In Form footer I have a combobox with Department names and IDs (not shown to user), and a button to save values.
I have to now figure out, how to select all rows/records with a checked checkbox and update them. I am by the way familiar with VB and SQL.
I would appreciate any idea/knowledge on how to solve this.
An extra field in the Detail section won't help you if you don't link it with a data field in the displayed table. If you can do that, then you have simply to make a VBA function to update all selected rows, and refresh the recordset.
If you cannot modify your table, you'll have to create a new table with just the key columns of your master table, and manage it via VBA. Better to use the first option if you can, it pollutes your schema, but in most cases that won't be a problem for an Access database.