Kamis, 04 April 2013

RE: [MS_AccessPros] Print fixed height vertical lines in detail section

 

Abdul-

Ah, didn't think of that. One way to solve it is to create a table (let's
call it ztblReportLines) with a single number as the field, and then create
rows in the table with numbers 1 to n where n is the number of lines needed
to create a full page. Then create two queries:

qryInventoryCount:
SELECT tblInventory.*, DCount("*", "tblInventory", "InventoryID <= " &
[InventoryID]) As LineNo
FROM tblInventory

qryReportInventory:
SELECT ztblReportLines.Number, qryInventoryCount.*
FROM ztblReportLines LEFT JOIN qryInventoryCount
ON ztblReportLines.Number = qryInventoryCount.LineNo

The second query, when used as the Record Source for your report, should
give you one line for each inventory record plus "n" blank lines to push the
detail section to the bottom of the page.

One caveat: If this is a subreport or filtered in any way by some sort of
grouping, you'll need to add that filter to the third part of the DCount so
that you're only "counting" the lines that go on one page.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Abdul Shakeel
Sent: Thursday, April 04, 2013 11:30 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Print fixed height vertical lines in detail
section

Dear John

I have already use this method as follows:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Me.ScaleMode = 5
Me.ForeColor = 0
Me.Line (0.6042, 0)-(0.6146, 5)

End Sub

however I set line height to 5" but it print only for number of records in
the detail section, if I increase the height of detail section to 5" then
every record will be printed with equal space of 5"

On Thu, Apr 4, 2013 at 1:55 PM, John Viescas <JohnV@msn.com> wrote:

> **
>
>
> Abdul-
>
> If you want the lines to go to the bottom of the page regardless of
> the number of detail lines printed, you'll have to use the Line
> method. You can find details here:
>
> http://msdn.microsoft.com/en-us/library/office/bb237986(v=office.12).a
> spx
>
>
> John Viescas, Author
> Microsoft Access 2010 Inside Out
> Microsoft Access 2007 Inside Out
> Microsoft Access 2003 Inside Out
> Building Microsoft Access Applications SQL Queries for Mere Mortals
> http://www.viescas.com/ (Paris, France)
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Abdul
> Shakeel
> Sent: Thursday, April 04, 2013 7:00 AM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: Re: [MS_AccessPros] Print fixed height vertical lines in
> detail section
>
> Dear Duane
>
> I have uploaded the file and my simple requirement is that I want my
> detail section looks like the attach file
>
> On Wed, Apr 3, 2013 at 5:35 PM, Duane Hookom <duanehookom@hotmail.com
> >wrote:
>
> > **
>
> >
> >
> > Abdul,
> >
> > You can post files in our group's Assistance Needed folder
> > http://tech.groups.yahoo.com/group/MS_Access_Professionals/files/2_A
> > ss
> > istanceNeeded/
> >
> > It also helps if you can describe your requirements more fully.
> >
> >
> > Duane Hookom MVP
> > MS Access
> >
> > ----------------------------------------
> > > From: maxccess@gmail.com
> >
> > >
> > > Dear Duane
> > >
> > > Yes this is I really want to do my report for more detail I am
> > > attaching here a pic this is what I would like my report detail
> > > section
> looks like.
> > >
> > >
> > > On Tue, Apr 2, 2013 at 7:34 PM, Duane Hookom
> > ><duanehookom@hotmail.com
> > >wrote:
> > >
> > > > **
> >
> > > >
> > > >
> > > > Abdul,
> > > > If I understand, you would like a fixed height of a number of
> > > > records
> > in
> > > > the detail section.
> > > >
> > > > For instance if the report was for Orders and Order Details
> > > > where the report is grouped by OrderID. You would like to have
> > > > the order details
> > take
> > > > up a fixed vertical space (like 3") regardless if there is one
> > > > order
> > detail
> > > > or five order details. In addition, you would like a vertical
> > > > line
> > from top
> > > > to bottom of the "details" for each order.
> > > >
> > > > Is this what you actually would like? It really helps if you can
> > provide
> > > > some context to your question.
> > > >
> > > > Duane Hookom MVP
> > > > MS Access
> > > >
> > > > ----------------------------------------
> > > > > From: JohnV@msn.com
> > > >
> > > > >
> > > > > Abdul-
> > > > >
> > > > > Have you tried using the line control postitioned vertically?
> > > > >
> > > > > John Viescas, Author
> > > > >
> > > > > -----Original Message-----
> > > > > [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of
> > > > > Abdul
> > > > Shakeel
> > > > >
> > > > > Dear John
> > > > >
> > > > > I have control with can grow property set to No but I want to
> > > > > put a
> > > > vertical
> > > > > line with fixed height in detail section, let say vertical
> > > > > line
> > height
> > > > is 3
> > > > > in whether there is on line of record.
> > > > >
> > > > >
> > > > > On Tue, Apr 2, 2013 at 4:50 PM, John Viescas <JohnV@msn.com>
> wrote:
> > > > >
> > > > > > **
> > > > > >
> > > > > >
> > > > > > Abdul-
> > > > > >
> > > > > > If there are no Can Grow controls, simply add line controls
> > > > > > from Height = 0 to the height of the section. I you have
> > > > > > controls that
> > Can
> > > > > > Grow, you'll need to use the Line method.
> > > > > >
> > > > > > John Viescas, Author
> > > > > >
> > > > > > [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf
> > > > > > Of
> > Abdul
> > > > > > Shakeel
> > > > > >
> > > > > > Dear All
> > > > > >
> > > > > > How can I print a fixed height detail section with vertical
> > > > > > lines
> > even
> > > > > > if there are only a few records?
> > > > > >
> > > > > > I asked these question in many forums but haven't got the
> > > > > > answer yet...plz help.
> > > > > >
> > > > > > --
> > > > > > Regards,
> > > > > > Abdul Shakeel
> >
> >
> >
>
> --
> Regards,
> Abdul Shakeel
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

--
Regards,
Abdul Shakeel

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (11)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar