?
Solved

Multiple record set format on same report

Posted on 2008-10-12
7
Medium Priority
?
272 Views
Last Modified: 2013-11-28
I need to create a report to print a manufacturing work order production steps traveler (for those familiar with manufacturing this is basically the production routing/bill of materials traveler). This is a hard copy document that describes every necessary production steps for a making a part/product. Currently we are generating and printing this hard coded report from an Excel workbook and we have more that 40 different versions. The report is of a tabular layout with every line/column boxed. We want to replace theses Excel worksheets with an MS-Access report. The work order information and production steps are all contained in SQL Server tables and I have the capability of adding any extra columns if necessary. What I was planning to do was to design a report for a work order and a sub-report for the work order steps. My issue is that I have up to 5 different record/line/step formats, all of the same total line width by with different number of columns, font sizes and heights. I do not want to code 40 different reports. Is there a way I can define 5 different record/line/step format and conditionally hide/display based on a values found in the work order steps record set?
0
Comment
Question by:fishbait01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 38

Assisted Solution

by:puppydogbuddy
puppydogbuddy earned 400 total points
ID: 22697547
There are quite a few things you can do, and most of it can be done using VBA code, as illustrated in the link I provided below.  Each report section is really just a control whose properties you can modify.  For example, see the code used to hide the detail section to print out a Summary Report.  The ability to exclude/collapse or include/expand, or otherwise control certain sections of a report/subreport  depending on user selection is an extremely powerful tool that I think you will find extremely useful for the things you want to accomplish.
                                       Access Report Tricks
            http://www.databasejournal.com/features/msaccess/article.php/10895_3104211_2
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22698973
fishbait01,

Obviously, there is absolutely no way any expert here can give you a concise answer without seeing your data.
Agreed?
;-)

You stated what you have, but it is not clear exactly what you need.
Meaning, you simply stated:
   "We want to replace theses Excel worksheets with an MS-Access report."
So how can we help, if we have no idea of how these Excel reports are designed?

Or am I missing something?

JeffCoachman
0
 

Author Comment

by:fishbait01
ID: 22700805
Theses excel worksheet have no macros. They simply are static columns to which a user manually enters data in 4 cells then prints. In the attached XLS file example, data is manually entered in cells A2, D2, D3 and E3. Then the document is printed.

What I want to do is replicate this document using a MS-Access report. As I mentionned before the work order and work order step data are already in a SQL Server database except for the info column. I plan to add this data to the appropriate SQL Server tables. Imagining a group sort on the work order number, the excel lines would breakdown as follows:
     Lines 1,2,3,4 are work order group header information
     Lines 5 through 18 are work order steps information (the line count will vary based on the part)
     Lines 19 to 22 are static group footer information.

I planning to have a report to manage the work order group header and static footer and call a sub-report to handle the work order steps. Because I have, in this example, 4 different work order steps layout (Lines 5,9,14 and line 16) I am wondering if I could have 4 different "report detail sections", one for each layout type, and selectively choose which one to display based on data found the record set returned by the data source?
CurrentRoutingExample.xls
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22701251
fishbait01,

What you are trying to do here will require Excel coding as well.

Your question is more of a "Design Project", than a simple question requiring a straightforward answer.

Click the "Request Attention" button in your original post, and ask that the Excel Zone be added to this question.

JeffCoachman
0
 

Author Comment

by:fishbait01
ID: 22701605
JeffCoachman,

I thank you for taking the time to respond but I feel that we are not on the same wave length here. Puppydogbuddys reply was helpful but did not totally guide me to what I am looking for. I'm asking an MS-Access report question about the possibility of having multiple detail sections in a same report. Maybe it is not possible and if that is the case, then case close and I will look for another reporting tool. I am not an MS-Access developer so I might not be using the right terminology. Maybe I made the mistake of giving out too much information. We are hoping to replace this current business process described earlier and dropping Excel altogether.
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 22701705
You can't create 4 detail sections simultaneously, but you can, for example, dynamically change the record source , which will accomplish the same thing because the detail section can grow and shrink with the amount of detail.  The Access report writer is very robust and flexible.

Example Of one way out many different ways.
If Me!RptNo = 1 then    <<<<<RptId passed from report launcher
    Me.RecordSource = strSql1
ElseIf Me!RptNo = 2 then
    Me.RecordSource = strSql2
______________________
______________________
End If
 
     
0
 

Accepted Solution

by:
fishbait01 earned 0 total points
ID: 22709746
Thanks for all your help. We have decided to use a different solution and we will not be using neither Excel or MS-Access.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question