A.D. -
 
Thank you for the sample.  However, in my instance, I don't know how many records are going to be in the sub report.  So, how do I modify the query Q_Sub_A to allow for different quantities?
 
In my particular instance, I have been creating/modifying a recipe database.  Therefore, for each RecipeID, I have a varying number of ingredients associated with each recipe.  I can see that the Batch is used to assist in the calculation of the number of detail records, but I am not sure how to get that calculation if I don't know what the "Gap" is going to be?
 
My recordsource for the Main Report:
    SELECT  Recipes.*, [Food Categories].FoodCategory FROM [Food Categories] RIGHT JOIN Recipes ON [Food Categories].FoodCategoryID = Recipes.FoodCategoryID;
 
My recordsource for the Sub Report:
    SELECT DISTINCTROW [Recipe Ingredients].*, Nz([Quantity]+" ")+[Ingredients.Ingredient] & nz(", "+[comments]) AS MyIngredients FROM Ingredients INNER JOIN [Recipe Ingredients] ON Ingredients.IngredientID = [Recipe Ingredients].IngredientID;
 
 
BTW - I am modifing the sample database found at:  http://office.microsoft.com/en-us/templates/TC010186351033.aspx
 
Dawn Crosier
Application Specialist
"Education Lasts a Lifetime"



From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of A.D.Tejpal
Sent: Wednesday, January 18, 2006 12:54 PM
To: [email protected]
Cc: ADT
Subject: Re: [AccessDevelopers] Multi Column Report

Dawn,
 
    Sample db named  SubReportTwoColBalanced_2K.zip, uploaded to files section, demonstrates balanced display of multi-column subreport despite its layout being "Down & Then Across".
 
    When you click the command button for report preview, the process involves two stage opening. At first the subreport is opened temporarily as an independent report so as to build up an array of required heights of subreport control on each page. It then closes, followed by opening of main report.
 
    The underlying approach could be adapted suitably for your specific situation.
 
Best wishes,
A.D.Tejpal



Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to