many querries into report

R

reportyemi

i have many records of patients i am going to create with many fields. Then i
need to generate a monthly report from the patients records. i am trying to
get the total of various fields which sometimes are interdependent so i have
run several querries to get the answers. How can i now put everything
together into one report. For example, these are te querries i have created-
-determine total number of mothers and babies by single,twins,triplets
parameters etc
-total no of live babies based on sex ( male or female)
-total number of mode of delivery - normal,cesarean, vacuum,forceps
-age of mother in age ranges
-total number of babies with bith weight less than 2.5kg divided into either
first time mothers or previous mothers (parity)

So i had to make querries for each of these for the preceeding month. So
how do i put everything into one report or is this impossible?
 
K

KARL DEWEY

Why not use only one query ---

SELECT Format([YourDateField],â€mmm yyyyâ€), Sum(IIF([Mother]=True,1,0)) AS
Mothers, Sum(IIF([Single]=True,1,0)) AS Single_Births, Etc… summing IIF
statements ….
FROM YourTable
WHERE Format([YourDateField],â€yyyymmâ€) =
Format(DateAdd(“mâ€,-1,Date()),â€yyyymmâ€)
GROUP BY Format([YourDateField],â€mmm yyyyâ€);

I did not have your field names so I just winged it. Hope you can follow.
If not then post your table structure with field names, datatype, and sample
data.
 
R

reportyemi

i really tried all weekend but just didnot get it. I have two tables
tblinfant with fields such as numbers(single,twin,triplets; condition (alive
and well, intensive care, dead, stillbirth;mode of delivery normal
,cesarean,vacuum; sex (male,female) and then i have tblmaternal, the mother
table with its own field such as age ,referral from, .

So i wanted to get different sums of different parameters and that is why i
ran querries for each outcome but there has to be an easir way . So i want to
find out how many of the live babies are female and male; how many mothers
had single ,twin,triplet babies; of the babies born, how many were below
2.5kg and of those, how many were born by first time mothers (primips) and
how many by prior mothers (multips; how many of the delievries were by
normal,cesarean,vacuum methods and finally i wanted to categorize the mothers
so i can say we had 20 women in the 20-24 age range, 21 in the 25 to 29age
range etc)
All this information i want to create a monthly report with

Thanks

yemi


KARL DEWEY said:
Why not use only one query ---

SELECT Format([YourDateField],â€mmm yyyyâ€), Sum(IIF([Mother]=True,1,0)) AS
Mothers, Sum(IIF([Single]=True,1,0)) AS Single_Births, Etc… summing IIF
statements ….
FROM YourTable
WHERE Format([YourDateField],â€yyyymmâ€) =
Format(DateAdd(“mâ€,-1,Date()),â€yyyymmâ€)
GROUP BY Format([YourDateField],â€mmm yyyyâ€);

I did not have your field names so I just winged it. Hope you can follow.
If not then post your table structure with field names, datatype, and sample
data.

reportyemi said:
i have many records of patients i am going to create with many fields. Then i
need to generate a monthly report from the patients records. i am trying to
get the total of various fields which sometimes are interdependent so i have
run several querries to get the answers. How can i now put everything
together into one report. For example, these are te querries i have created-
-determine total number of mothers and babies by single,twins,triplets
parameters etc
-total no of live babies based on sex ( male or female)
-total number of mode of delivery - normal,cesarean, vacuum,forceps
-age of mother in age ranges
-total number of babies with bith weight less than 2.5kg divided into either
first time mothers or previous mothers (parity)

So i had to make querries for each of these for the preceeding month. So
how do i put everything into one report or is this impossible?
 
K

KARL DEWEY

Post your table structure with field names, datatype, and sample data.


reportyemi said:
i really tried all weekend but just didnot get it. I have two tables
tblinfant with fields such as numbers(single,twin,triplets; condition (alive
and well, intensive care, dead, stillbirth;mode of delivery normal
,cesarean,vacuum; sex (male,female) and then i have tblmaternal, the mother
table with its own field such as age ,referral from, .

So i wanted to get different sums of different parameters and that is why i
ran querries for each outcome but there has to be an easir way . So i want to
find out how many of the live babies are female and male; how many mothers
had single ,twin,triplet babies; of the babies born, how many were below
2.5kg and of those, how many were born by first time mothers (primips) and
how many by prior mothers (multips; how many of the delievries were by
normal,cesarean,vacuum methods and finally i wanted to categorize the mothers
so i can say we had 20 women in the 20-24 age range, 21 in the 25 to 29age
range etc)
All this information i want to create a monthly report with

Thanks

yemi


KARL DEWEY said:
Why not use only one query ---

SELECT Format([YourDateField],â€mmm yyyyâ€), Sum(IIF([Mother]=True,1,0)) AS
Mothers, Sum(IIF([Single]=True,1,0)) AS Single_Births, Etc… summing IIF
statements ….
FROM YourTable
WHERE Format([YourDateField],â€yyyymmâ€) =
Format(DateAdd(“mâ€,-1,Date()),â€yyyymmâ€)
GROUP BY Format([YourDateField],â€mmm yyyyâ€);

I did not have your field names so I just winged it. Hope you can follow.
If not then post your table structure with field names, datatype, and sample
data.

reportyemi said:
i have many records of patients i am going to create with many fields. Then i
need to generate a monthly report from the patients records. i am trying to
get the total of various fields which sometimes are interdependent so i have
run several querries to get the answers. How can i now put everything
together into one report. For example, these are te querries i have created-
-determine total number of mothers and babies by single,twins,triplets
parameters etc
-total no of live babies based on sex ( male or female)
-total number of mode of delivery - normal,cesarean, vacuum,forceps
-age of mother in age ranges
-total number of babies with bith weight less than 2.5kg divided into either
first time mothers or previous mothers (parity)

So i had to make querries for each of these for the preceeding month. So
how do i put everything into one report or is this impossible?
 
R

reportyemi

i tried to do it but failed. please help. i gave examples

maternal date of admission parity
0
2
4

infant condition number sex deliverytype
alive single male normal
alive twins female c/s
dead twins female normal
icu single male normal
stillbirth single male vacuum




KARL DEWEY said:
Post your table structure with field names, datatype, and sample data.


reportyemi said:
i really tried all weekend but just didnot get it. I have two tables
tblinfant with fields such as numbers(single,twin,triplets; condition (alive
and well, intensive care, dead, stillbirth;mode of delivery normal
,cesarean,vacuum; sex (male,female) and then i have tblmaternal, the mother
table with its own field such as age ,referral from, .

So i wanted to get different sums of different parameters and that is why i
ran querries for each outcome but there has to be an easir way . So i want to
find out how many of the live babies are female and male; how many mothers
had single ,twin,triplet babies; of the babies born, how many were below
2.5kg and of those, how many were born by first time mothers (primips) and
how many by prior mothers (multips; how many of the delievries were by
normal,cesarean,vacuum methods and finally i wanted to categorize the mothers
so i can say we had 20 women in the 20-24 age range, 21 in the 25 to 29age
range etc)
All this information i want to create a monthly report with

Thanks

yemi


KARL DEWEY said:
Why not use only one query ---

SELECT Format([YourDateField],â€mmm yyyyâ€), Sum(IIF([Mother]=True,1,0)) AS
Mothers, Sum(IIF([Single]=True,1,0)) AS Single_Births, Etc… summing IIF
statements ….
FROM YourTable
WHERE Format([YourDateField],â€yyyymmâ€) =
Format(DateAdd(“mâ€,-1,Date()),â€yyyymmâ€)
GROUP BY Format([YourDateField],â€mmm yyyyâ€);

I did not have your field names so I just winged it. Hope you can follow.
If not then post your table structure with field names, datatype, and sample
data.

:

i have many records of patients i am going to create with many fields. Then i
need to generate a monthly report from the patients records. i am trying to
get the total of various fields which sometimes are interdependent so i have
run several querries to get the answers. How can i now put everything
together into one report. For example, these are te querries i have created-
-determine total number of mothers and babies by single,twins,triplets
parameters etc
-total no of live babies based on sex ( male or female)
-total number of mode of delivery - normal,cesarean, vacuum,forceps
-age of mother in age ranges
-total number of babies with bith weight less than 2.5kg divided into either
first time mothers or previous mothers (parity)

So i had to make querries for each of these for the preceeding month. So
how do i put everything into one report or is this impossible?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top