PC Review


Reply
Thread Tools Rate Thread

Designing a report based on a crosstabe

 
 
=?Utf-8?B?VGlhZ28=?=
Guest
Posts: n/a
 
      26th Oct 2007
Hello!

Hope someone can help cause this is getting into my nerves...

I have a crosstabe that I run with a parameter for "date of sales".
Date of Sale is my column and the results are showed per month. So I run the
query and set the dates from 01/jan/07 to 31/july/07 and the query returns
the 7 months I want (mm/yy). How could I design a report that that would run
with various parameters? From what I understood so far, the field in the
report must necessarily have the name of the result achieved (ex. 01/07,
02/07, 03/07...).

Hope I made myself understandable...

Cheers everyone.
 
Reply With Quote
 
 
 
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      26th Oct 2007
If what you are asking is to show a column for each month regardless if
there is a value in it, In the Design View of the Crosstab, right-click on a
blank area and choose Properties. In the column header box, add ever month
separated by commas ("Jan","Feb","Mar" ... "Dec")
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Tiago" <(E-Mail Removed)> wrote in message
news:AE6C4548-70EC-44C6-A667-(E-Mail Removed)...
> Hello!
>
> Hope someone can help cause this is getting into my nerves...
>
> I have a crosstabe that I run with a parameter for "date of sales".
> Date of Sale is my column and the results are showed per month. So I run
> the
> query and set the dates from 01/jan/07 to 31/july/07 and the query returns
> the 7 months I want (mm/yy). How could I design a report that that would
> run
> with various parameters? From what I understood so far, the field in the
> report must necessarily have the name of the result achieved (ex. 01/07,
> 02/07, 03/07...).
>
> Hope I made myself understandable...
>
> Cheers everyone.



 
Reply With Quote
 
=?Utf-8?B?VGlhZ28=?=
Guest
Posts: n/a
 
      29th Oct 2007
Hello Arvin and thanks for your quick reply.

I reckon this property.
What I need is that once I insert a parameter for exemple from March to
November, my report would start with the first column march and then stop at
november. What I'm doing is having like 20 fixed columns but I need them to
vary according to the parameter I insert.

Hope I was more clear now...

Cheers mate.
"Arvin Meyer [MVP]" wrote:

> If what you are asking is to show a column for each month regardless if
> there is a value in it, In the Design View of the Crosstab, right-click on a
> blank area and choose Properties. In the column header box, add ever month
> separated by commas ("Jan","Feb","Mar" ... "Dec")
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
> "Tiago" <(E-Mail Removed)> wrote in message
> news:AE6C4548-70EC-44C6-A667-(E-Mail Removed)...
> > Hello!
> >
> > Hope someone can help cause this is getting into my nerves...
> >
> > I have a crosstabe that I run with a parameter for "date of sales".
> > Date of Sale is my column and the results are showed per month. So I run
> > the
> > query and set the dates from 01/jan/07 to 31/july/07 and the query returns
> > the 7 months I want (mm/yy). How could I design a report that that would
> > run
> > with various parameters? From what I understood so far, the field in the
> > report must necessarily have the name of the result achieved (ex. 01/07,
> > 02/07, 03/07...).
> >
> > Hope I made myself understandable...
> >
> > Cheers everyone.

>
>
>

 
Reply With Quote
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      29th Oct 2007
Here's some code from a database I wrote about 10 years ago. The code was
adapted from a KB article (I think) but I can't find it now:

Option Compare Database 'Use database order for string comparisons.
Option Explicit

' Constant for maximum number of columns XTab query would
' create plus 1 for a Totals column.
Const conTotalColumns = 13

' Variables for Database object and Recordset.
Dim dbsReport As Database
Dim rstReport As Recordset

' Variables for number of columns and row and report totals.
Dim intColumnCount As Integer
Dim lngRgColumnTotal(1 To conTotalColumns) As Long
Dim lngReportTotal As Long

Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
' Place values in text boxes and hide unused text boxes.

Dim intX As Integer
' Verify that not at end of recordset.
If Not rstReport.EOF Then
' If FormatCount is 1, place values from recordset into text boxes
' in detail section.
If Me.FormatCount = 1 Then
For intX = 1 To intColumnCount
' Convert Null values to 0.
Me("Col" + Format(intX)) = xtabCnulls(rstReport(intX - 1))
Next intX

' Hide unused text boxes in detail section.
For intX = intColumnCount + 2 To conTotalColumns
Me("Col" + Format(intX)).Visible = False
Next intX

' Move to next record in recordset.
rstReport.MoveNext
End If
End If


End Sub

--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Tiago" <(E-Mail Removed)> wrote in message
news:C47C8C2B-AF02-4715-8532-(E-Mail Removed)...
> Hello Arvin and thanks for your quick reply.
>
> I reckon this property.
> What I need is that once I insert a parameter for exemple from March to
> November, my report would start with the first column march and then stop
> at
> november. What I'm doing is having like 20 fixed columns but I need them
> to
> vary according to the parameter I insert.
>
> Hope I was more clear now...
>
> Cheers mate.
> "Arvin Meyer [MVP]" wrote:
>
>> If what you are asking is to show a column for each month regardless if
>> there is a value in it, In the Design View of the Crosstab, right-click
>> on a
>> blank area and choose Properties. In the column header box, add ever
>> month
>> separated by commas ("Jan","Feb","Mar" ... "Dec")
>> --
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>> "Tiago" <(E-Mail Removed)> wrote in message
>> news:AE6C4548-70EC-44C6-A667-(E-Mail Removed)...
>> > Hello!
>> >
>> > Hope someone can help cause this is getting into my nerves...
>> >
>> > I have a crosstabe that I run with a parameter for "date of sales".
>> > Date of Sale is my column and the results are showed per month. So I
>> > run
>> > the
>> > query and set the dates from 01/jan/07 to 31/july/07 and the query
>> > returns
>> > the 7 months I want (mm/yy). How could I design a report that that
>> > would
>> > run
>> > with various parameters? From what I understood so far, the field in
>> > the
>> > report must necessarily have the name of the result achieved (ex.
>> > 01/07,
>> > 02/07, 03/07...).
>> >
>> > Hope I made myself understandable...
>> >
>> > Cheers everyone.

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?VGlhZ28=?=
Guest
Posts: n/a
 
      31st Oct 2007
Thanks a lot Arvin, but this is way out my reach...

"Arvin Meyer [MVP]" wrote:

> Here's some code from a database I wrote about 10 years ago. The code was
> adapted from a KB article (I think) but I can't find it now:
>
> Option Compare Database 'Use database order for string comparisons.
> Option Explicit
>
> ' Constant for maximum number of columns XTab query would
> ' create plus 1 for a Totals column.
> Const conTotalColumns = 13
>
> ' Variables for Database object and Recordset.
> Dim dbsReport As Database
> Dim rstReport As Recordset
>
> ' Variables for number of columns and row and report totals.
> Dim intColumnCount As Integer
> Dim lngRgColumnTotal(1 To conTotalColumns) As Long
> Dim lngReportTotal As Long
>
> Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
> ' Place values in text boxes and hide unused text boxes.
>
> Dim intX As Integer
> ' Verify that not at end of recordset.
> If Not rstReport.EOF Then
> ' If FormatCount is 1, place values from recordset into text boxes
> ' in detail section.
> If Me.FormatCount = 1 Then
> For intX = 1 To intColumnCount
> ' Convert Null values to 0.
> Me("Col" + Format(intX)) = xtabCnulls(rstReport(intX - 1))
> Next intX
>
> ' Hide unused text boxes in detail section.
> For intX = intColumnCount + 2 To conTotalColumns
> Me("Col" + Format(intX)).Visible = False
> Next intX
>
> ' Move to next record in recordset.
> rstReport.MoveNext
> End If
> End If
>
>
> End Sub
>
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
>
> "Tiago" <(E-Mail Removed)> wrote in message
> news:C47C8C2B-AF02-4715-8532-(E-Mail Removed)...
> > Hello Arvin and thanks for your quick reply.
> >
> > I reckon this property.
> > What I need is that once I insert a parameter for exemple from March to
> > November, my report would start with the first column march and then stop
> > at
> > november. What I'm doing is having like 20 fixed columns but I need them
> > to
> > vary according to the parameter I insert.
> >
> > Hope I was more clear now...
> >
> > Cheers mate.
> > "Arvin Meyer [MVP]" wrote:
> >
> >> If what you are asking is to show a column for each month regardless if
> >> there is a value in it, In the Design View of the Crosstab, right-click
> >> on a
> >> blank area and choose Properties. In the column header box, add ever
> >> month
> >> separated by commas ("Jan","Feb","Mar" ... "Dec")
> >> --
> >> Arvin Meyer, MCP, MVP
> >> http://www.datastrat.com
> >> http://www.mvps.org/access
> >> http://www.accessmvp.com
> >>
> >> "Tiago" <(E-Mail Removed)> wrote in message
> >> news:AE6C4548-70EC-44C6-A667-(E-Mail Removed)...
> >> > Hello!
> >> >
> >> > Hope someone can help cause this is getting into my nerves...
> >> >
> >> > I have a crosstabe that I run with a parameter for "date of sales".
> >> > Date of Sale is my column and the results are showed per month. So I
> >> > run
> >> > the
> >> > query and set the dates from 01/jan/07 to 31/july/07 and the query
> >> > returns
> >> > the 7 months I want (mm/yy). How could I design a report that that
> >> > would
> >> > run
> >> > with various parameters? From what I understood so far, the field in
> >> > the
> >> > report must necessarily have the name of the result achieved (ex.
> >> > 01/07,
> >> > 02/07, 03/07...).
> >> >
> >> > Hope I made myself understandable...
> >> >
> >> > Cheers everyone.
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
tracy
Guest
Posts: n/a
 
      2nd Nov 2007

"Tiago" <(E-Mail Removed)> wrote in message
news:A94D8851-318E-46F4-9A66-(E-Mail Removed)...
> Thanks a lot Arvin, but this is way out my reach...
>
> "Arvin Meyer [MVP]" wrote:
>
>> Here's some code from a database I wrote about 10 years ago. The code was
>> adapted from a KB article (I think) but I can't find it now:
>>
>> Option Compare Database 'Use database order for string comparisons.
>> Option Explicit
>>
>> ' Constant for maximum number of columns XTab query would
>> ' create plus 1 for a Totals column.
>> Const conTotalColumns = 13
>>
>> ' Variables for Database object and Recordset.
>> Dim dbsReport As Database
>> Dim rstReport As Recordset
>>
>> ' Variables for number of columns and row and report totals.
>> Dim intColumnCount As Integer
>> Dim lngRgColumnTotal(1 To conTotalColumns) As Long
>> Dim lngReportTotal As Long
>>
>> Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
>> ' Place values in text boxes and hide unused text boxes.
>>
>> Dim intX As Integer
>> ' Verify that not at end of recordset.
>> If Not rstReport.EOF Then
>> ' If FormatCount is 1, place values from recordset into text
>> boxes
>> ' in detail section.
>> If Me.FormatCount = 1 Then
>> For intX = 1 To intColumnCount
>> ' Convert Null values to 0.
>> Me("Col" + Format(intX)) = xtabCnulls(rstReport(intX -
>> 1))
>> Next intX
>>
>> ' Hide unused text boxes in detail section.
>> For intX = intColumnCount + 2 To conTotalColumns
>> Me("Col" + Format(intX)).Visible = False
>> Next intX
>>
>> ' Move to next record in recordset.
>> rstReport.MoveNext
>> End If
>> End If
>>
>>
>> End Sub
>>
>> --
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>>
>> "Tiago" <(E-Mail Removed)> wrote in message
>> news:C47C8C2B-AF02-4715-8532-(E-Mail Removed)...
>> > Hello Arvin and thanks for your quick reply.
>> >
>> > I reckon this property.
>> > What I need is that once I insert a parameter for exemple from March to
>> > November, my report would start with the first column march and then
>> > stop
>> > at
>> > november. What I'm doing is having like 20 fixed columns but I need
>> > them
>> > to
>> > vary according to the parameter I insert.
>> >
>> > Hope I was more clear now...
>> >
>> > Cheers mate.
>> > "Arvin Meyer [MVP]" wrote:
>> >
>> >> If what you are asking is to show a column for each month regardless
>> >> if
>> >> there is a value in it, In the Design View of the Crosstab,
>> >> right-click
>> >> on a
>> >> blank area and choose Properties. In the column header box, add ever
>> >> month
>> >> separated by commas ("Jan","Feb","Mar" ... "Dec")
>> >> --
>> >> Arvin Meyer, MCP, MVP
>> >> http://www.datastrat.com
>> >> http://www.mvps.org/access
>> >> http://www.accessmvp.com
>> >>
>> >> "Tiago" <(E-Mail Removed)> wrote in message
>> >> news:AE6C4548-70EC-44C6-A667-(E-Mail Removed)...
>> >> > Hello!
>> >> >
>> >> > Hope someone can help cause this is getting into my nerves...
>> >> >
>> >> > I have a crosstabe that I run with a parameter for "date of sales".
>> >> > Date of Sale is my column and the results are showed per month. So I
>> >> > run
>> >> > the
>> >> > query and set the dates from 01/jan/07 to 31/july/07 and the query
>> >> > returns
>> >> > the 7 months I want (mm/yy). How could I design a report that that
>> >> > would
>> >> > run
>> >> > with various parameters? From what I understood so far, the field in
>> >> > the
>> >> > report must necessarily have the name of the result achieved (ex.
>> >> > 01/07,
>> >> > 02/07, 03/07...).
>> >> >
>> >> > Hope I made myself understandable...
>> >> >
>> >> > Cheers everyone.
>> >>
>> >>
>> >>

>>
>>
>>


 
Reply With Quote
 
tracy
Guest
Posts: n/a
 
      2nd Nov 2007

"Tiago" <(E-Mail Removed)> wrote in message
news:A94D8851-318E-46F4-9A66-(E-Mail Removed)...
> Thanks a lot Arvin, but this is way out my reach...
>
> "Arvin Meyer [MVP]" wrote:
>
>> Here's some code from a database I wrote about 10 years ago. The code was
>> adapted from a KB article (I think) but I can't find it now:
>>
>> Option Compare Database 'Use database order for string comparisons.
>> Option Explicit
>>
>> ' Constant for maximum number of columns XTab query would
>> ' create plus 1 for a Totals column.
>> Const conTotalColumns = 13
>>
>> ' Variables for Database object and Recordset.
>> Dim dbsReport As Database
>> Dim rstReport As Recordset
>>
>> ' Variables for number of columns and row and report totals.
>> Dim intColumnCount As Integer
>> Dim lngRgColumnTotal(1 To conTotalColumns) As Long
>> Dim lngReportTotal As Long
>>
>> Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
>> ' Place values in text boxes and hide unused text boxes.
>>
>> Dim intX As Integer
>> ' Verify that not at end of recordset.
>> If Not rstReport.EOF Then
>> ' If FormatCount is 1, place values from recordset into text
>> boxes
>> ' in detail section.
>> If Me.FormatCount = 1 Then
>> For intX = 1 To intColumnCount
>> ' Convert Null values to 0.
>> Me("Col" + Format(intX)) = xtabCnulls(rstReport(intX -
>> 1))
>> Next intX
>>
>> ' Hide unused text boxes in detail section.
>> For intX = intColumnCount + 2 To conTotalColumns
>> Me("Col" + Format(intX)).Visible = False
>> Next intX
>>
>> ' Move to next record in recordset.
>> rstReport.MoveNext
>> End If
>> End If
>>
>>
>> End Sub
>>
>> --
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>>
>> "Tiago" <(E-Mail Removed)> wrote in message
>> news:C47C8C2B-AF02-4715-8532-(E-Mail Removed)...
>> > Hello Arvin and thanks for your quick reply.
>> >
>> > I reckon this property.
>> > What I need is that once I insert a parameter for exemple from March to
>> > November, my report would start with the first column march and then
>> > stop
>> > at
>> > november. What I'm doing is having like 20 fixed columns but I need
>> > them
>> > to
>> > vary according to the parameter I insert.
>> >
>> > Hope I was more clear now...
>> >
>> > Cheers mate.
>> > "Arvin Meyer [MVP]" wrote:
>> >
>> >> If what you are asking is to show a column for each month regardless
>> >> if
>> >> there is a value in it, In the Design View of the Crosstab,
>> >> right-click
>> >> on a
>> >> blank area and choose Properties. In the column header box, add ever
>> >> month
>> >> separated by commas ("Jan","Feb","Mar" ... "Dec")
>> >> --
>> >> Arvin Meyer, MCP, MVP
>> >> http://www.datastrat.com
>> >> http://www.mvps.org/access
>> >> http://www.accessmvp.com
>> >>
>> >> "Tiago" <(E-Mail Removed)> wrote in message
>> >> news:AE6C4548-70EC-44C6-A667-(E-Mail Removed)...
>> >> > Hello!
>> >> >
>> >> > Hope someone can help cause this is getting into my nerves...
>> >> >
>> >> > I have a crosstabe that I run with a parameter for "date of sales".
>> >> > Date of Sale is my column and the results are showed per month. So I
>> >> > run
>> >> > the
>> >> > query and set the dates from 01/jan/07 to 31/july/07 and the query
>> >> > returns
>> >> > the 7 months I want (mm/yy). How could I design a report that that
>> >> > would
>> >> > run
>> >> > with various parameters? From what I understood so far, the field in
>> >> > the
>> >> > report must necessarily have the name of the result achieved (ex.
>> >> > 01/07,
>> >> > 02/07, 03/07...).
>> >> >
>> >> > Hope I made myself understandable...
>> >> >
>> >> > Cheers everyone.
>> >>
>> >>
>> >>

>>
>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Designing Form Based onTwo Tables =?Utf-8?B?TmF0IFZhc2N1bGFy?= Microsoft Access Forms 0 21st Nov 2006 08:35 PM
Designing an add-on based application fullxml@gmail.com Microsoft C# .NET 1 5th Jul 2006 12:32 AM
crosstabe question =?Utf-8?B?ZGxiMTIyOA==?= Microsoft Access Queries 2 17th Apr 2006 02:25 PM
Designing of database system based on .net Hawix Microsoft Dot NET Framework 2 17th Sep 2004 05:44 PM
re: Designing a web-page as well as window-based application Jim Buyens Microsoft Frontpage 0 3rd Sep 2004 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:22 AM.