Normal Topic SubForm Report (Read 1416 times)
UPaul42
Junior Member
Members
**
Offline


been a Q&A user/programmer
since version 2.0

Posts: 57
Location: Broad Brook CT
Joined: Jul 23rd, 2003
SubForm Report
Jan 19th, 2011 at 10:39pm
Print Post Print Post  
Trying to create a report based on data in a SubForm. Naturally linked, but with Main Form id and SubFormrecords with the same id available.
I want to have the report select specific records in the SubForm(a "Y";"N" element choosing only "N") and produce a report showing selected elements from both the Main Form and the SubForm

I have existing reports with the correct layout working from the Main Form and just want to be able to select only those SubForm records that have a "N" in the LE called "Done"

The SubForm appears as a table in the Main Form view
  

&&http://www.lantica.com/images/sespro_badges/sespro3.gif&&Paul Anderson&&President&&Systems-Consulting&&89 Main Street, Broad Brook CT 06016&&(860) 627-5393&&Sales@Systems-Consulting.com
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: SubForm Report
Reply #1 - Jan 20th, 2011 at 7:21pm
Print Post Print Post  
Hello Paul,

To do this you would program the subreport so that when Done is N all the elements in the group body are set to be visible, else they are set to be invisible. Something like

Code
Select All
If Done = "N" Then
{
 //Set all elements to be visible using the Visibility command.
}
Else
{
 //Set all elements to be invisible using the Visibility command.
} 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
UPaul42
Junior Member
Members
**
Offline


been a Q&A user/programmer
since version 2.0

Posts: 57
Location: Broad Brook CT
Joined: Jul 23rd, 2003
Re: SubForm Report
Reply #2 - Jan 26th, 2011 at 3:19pm
Print Post Print Post  
Ray,

I have tried to incorporate the Visibility concept.
It isn't all that pretty.
Can I send you the database to look at?
  

&&http://www.lantica.com/images/sespro_badges/sespro3.gif&&Paul Anderson&&President&&Systems-Consulting&&89 Main Street, Broad Brook CT 06016&&(860) 627-5393&&Sales@Systems-Consulting.com
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: SubForm Report
Reply #3 - Jan 27th, 2011 at 3:31pm
Print Post Print Post  
Hello Paul,

Sure. Send it in to Support@lantica.com and I'll take a look at it.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: SubForm Report
Reply #4 - Jan 27th, 2011 at 8:48pm
Print Post Print Post  
Hello Paul,

The programming can only hide the elements in the subreport itself, not the parent report as well. To exclude the parent records from showing up you will want to retrieve only the parent records that have N in the Done field of one of the Subrecords. The programming in the report will hide the other subrecords for each parent that do not have an N in the Done field.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
UPaul42
Junior Member
Members
**
Offline


been a Q&A user/programmer
since version 2.0

Posts: 57
Location: Broad Brook CT
Joined: Jul 23rd, 2003
Re: SubForm Report
Reply #5 - Jan 27th, 2011 at 9:11pm
Print Post Print Post  
Ray,

You've got the original idea.
How do I retrieve only those subform items that have a "N" in the Done eleent?
  

&&http://www.lantica.com/images/sespro_badges/sespro3.gif&&Paul Anderson&&President&&Systems-Consulting&&89 Main Street, Broad Brook CT 06016&&(860) 627-5393&&Sales@Systems-Consulting.com
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: SubForm Report
Reply #6 - Jan 27th, 2011 at 9:38pm
Print Post Print Post  
Hello Paul,

At the retrieve spec type an N in the Done element. This will retrieve any record that has at least one subrecord that has an N in it. Then run the Report on those records and the programming in the report will hide the subrecords that do not have an N in the Done element.

-Ray

*Edit* I just sent you back your files with the programming changed so that it compiles. Follow the above steps on those files.
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged