Solved

How to display on a report a subform in successing columns (2-3 fields are enough)

Posted on 2014-12-24
16
171 Views
Last Modified: 2014-12-29
Hi,

I need a report related to a form with 2 subforms..
The form is the summary of a multidisciplinary weekly consultation for orthopedic sepsis.. (RCP)
  One form for one patient and one consultation
     One subform for the bacteria isolated
    another subform for the treatment proposed
The consultation team finds an help on a draft report of the previous decisions..
The "anteriorté" report does just this
  When They staff patient "P" week "n", the draft report shows all previous treatemnt up to week "n-1"

What I would like to add, is the bacteria isolated each time. THey can be more than one (unusual, but...may occur)

I need to display on one line (and thus several columns) one bacteria next to the other..
And did not yet found how..
They are displayed one under the other.. And this takes too much place..

On a previous question I have already been helped on this point.. But when I asked for multicolumn display of the subform, the option is applicated on the totallity of the report and not only on the subform..

Does anyone now how to correct this?

Included a sample of the DB..

On the menu form, choose Identification patient. This will open the patien_ID form
On the patient ID form click on the small square under réf patient.  Chhos patient 1, This will open the RCP Form
On the RCP form go to the last record and click to the magnifying glass at the bottom part of the form left to the editing window. This will display the draft report of the previous RCP of that patient.

Thanks for any help

Jacques
RCP-Corrected-V1.54.mdb
0
Comment
Question by:weissenb
  • 8
  • 4
  • 4
16 Comments
 
LVL 34

Expert Comment

by:PatHartman
ID: 40516496
Here are pictures of the necessary settings for the subreport.  The initial blank is intentional to allow the users an easy place to add the current status. Design ViewReport View
0
 

Author Comment

by:weissenb
ID: 40516526
Yes. This is the answer you gave me in november. But if it is OK for the general report, it is not for the present case because it changes all the report, not only the subform (a second subreport of the report, in some way).
WHen I use that technic, the report is transformed in something un-readable.. So, may be I did something wrong?
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 350 total points
ID: 40516585
Sounds like you also changed the columns property of the main report.  The main report should be only one column.  Remove the subreport from the main report.  Does the main report render correctly?  Change the columns property of the subreport and add it back.  Make sure to fix the master/child links if necessary.

I can't show you a picture of the whole report since it contains client data but the snippet I posted is actually the second sub report.  The subreport above it is a list type report showing relations and the top part of the report is client demographic information.
0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 150 total points
ID: 40516787
As PatHarman says, It is the subreport _rqanterioMicrobio sous-état that needed 2 columns, and not the main report Antériorité

Altered sample attached.
Open _rqanterioMicrobio sous-état directly in Design view
Look at Page Setup.  See the two columns, no spacing, each as wide as the detail section.
Adjust as required.

Open Antériorité directly in Design view
Look at Page Setup.  See now only one column

Nick67
RCP-Corrected-Nick67-V1.54.mdb
0
 

Author Comment

by:weissenb
ID: 40516831
something very weird occured..
I have it,.... almost
  when I click on the record icon of the RCP,  I have my two germs on the same row  a little two much separated, but they are here. Perfect
I have set A one column format for the main report and a 2 columns for the sureport of that main report (directly on the subreport, not on the final report which integrates the subreport)

But if I click on that final report directly from the list of reports , then I have my subform in one column only.. This is why I didn't obtain the result expeted. Of course I can forbide the users to uses this way.. of displaying the anteriorities.. But better to understand why this occurs.

I include here that modified DB version 1.55
RCP-Corrected-V1.55.mdb
0
 

Author Comment

by:weissenb
ID: 40516838
OK Nick, I did it and it is OK.. But the different way of dispaying the report is not easy to understand. Nor the way to may both way working..
Looking the report by clicking on the command of the RCP form (which works) and not by using the report from the list of reports.. This is strange..
0
 
LVL 34

Expert Comment

by:PatHartman
ID: 40519042
Users should never be given access to the navigation pane.  They should use only forms and reports.  It is your job to hide the guts of the application from them to prevent accidental object or data changes.

There are several ways to open a report and the only ones that respect the column settings are - acViewPreview (open print preview) and acViewNormal (direct to printer) -- from the DoCmd.OpenReport method and from the nav pane it is Print Preview.  The other options format for interactive viewing.  The default when you double-click on a report in the nav pane is Report View.  So, you will see if you right click on the report in the nav pane and choose print preview it will render correctly.
0
 

Author Closing Comment

by:weissenb
ID: 40519123
PatHartmann explained how to display the subform in columns, and later why this works only when commanded from the form and not form the navigation panel
But Nick67 showed the solution practically directly on the database

Thanks to both of you

Best regards

Jacques
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 34

Expert Comment

by:PatHartman
ID: 40519916
I have my two germs on the same row  a little two much separated, but they are here
Adjust the size of the column and the width of the control so they are only as wide as you need them to be.  Increase the number of columns to display and decrease the space between the columns.  You'll have to play with it until it looks the way you want it to.  You can also hide the frame of the subreport if that helps.
0
 

Author Comment

by:weissenb
ID: 40520001
Thanks a lot for your help. I have done it like you say and it is perfect

Best regrads

Jacques
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40522090
Looking the report by clicking on the command of the RCP form (which works) and not by using the report from the list of reports.. This is strange..

The report Antériorité when opened from the database window looks for two parameters from Form Gestion_RCP.
It wants Ref_Patient --> so I give it 1 and it wants Ref_RCP --> so I give it 63  I know these numbers exist.

If I open the form, click on the button for patient 1, and go to the last record on the form that opens, I get the same results and it looks the same, for me.

I have my two germs on the same row  a little two much separated, but they are here. Perfect
If you temporarily change the BorderStyle to "Solid" and open _rqanterioMicrobio sous-état directly, you will be able to see all your germ names and the space they will take, and adjust accordingly.
0
 

Author Comment

by:weissenb
ID: 40522187
It does't really matter. The user has to use only the tools provided by the forms.
But.. No the result is not the same in terms of page edition. When displayed from the form 'Patient 1 RCP 63), I have my two germs displayed on one line (if I have 2 germs), as expected.  But I am on the same RCP, and open the report from the list of reports, then it doesn't work. All my germs (for that RCP) are in one unique columns. PatHartman explained why, one does a print preview and the other a report view and when you ask for a print preview of that form, the germs are on a single line (I verified : it is right)

When I open the _rqanterMicrobio Subreport ... I obtain a strange thing, A defaut refreshing of the screen. Every window, when displaced will let a trace on the screen.. This makes things difficult to read. What I can say is that the object seen behind that mess is a page (full sized page) with germes organized in lines and columns, but nothing I can change.
If I edit the subreport, then I see a mini report, with just one field dysplayed. Not more. And no germs of course. I probably did somthing wrong
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40522236
What I can say is that the object seen behind that mess is a page (full sized page) with germes organized in lines and columns, but nothing I can change.  
That is what is expected.
Many lines and two columns
Turn the BorderStyle property of the textbox to Solid and then look at the entries.
Are any cut off because they are too long?  Switch to Design View and make the control wider
Are they all well with in the control?  Size the control smaller until it comfortably contains the largest germ name.
Return the BorderStyle property to transparent

If I edit the subreport, then I see a mini report, with just one field displayed. Not more. And no germs of course. I probably did something wrong

No, that is correct.  A single control -- but you now are looking to size it to the value of the names that it will contain

But.. No the result is not the same in terms of page edition I see no difference in the sample you posted in Access 2003 but you clearly have different results.  Who knows why?
0
 

Author Comment

by:weissenb
ID: 40522715
OK. I Got it..

For the two way of displaying.. I propose to let it as it is. It will not be a big deal if some user see the listing in one column.. We have understood why and can explain.

But I use MSACCESS 2010,  I thought I use it, because all my machines work on PackOfficePro 2010.. But the first sample of these DB were created in 2005 and some part of them remain in the present version.. This can explain..
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40522758
OK
Good luck and I'll be watching for your next question
:)

Nick67
0
 

Author Comment

by:weissenb
ID: 40522879
The next weeks will tell me if my friends will adopt that tool or not.. Wait for the requeries they will want from that DB  and  than  rebuild it other ways..to fullfill their needs.   The DB is here to help not to be uselessly feeded.
So, may be I will come back.. Only good news

Take care

and thanks for your help

Jacques
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now