Solved

mutliple detail sections in a single report

Posted on 2003-10-27
10
508 Views
Last Modified: 2011-10-03
Can we use multiple detail sections in single report.Actaully I have two table where information of each table to be show in seperate detail section.
    so the format of my report should be
1)header section of first table
2)detail section of first table
3)header section of second table
4)detail section of second table
5)column of first table - column of second  table (taken as function) and shown in report

Can any one tell me how to present this information. actually i tried to move header section in between two detail sections using format but iam uanble to . can any one give a solution for it so that it will be so much usefull for me
0
Comment
Question by:satish_kotti
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
10 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 9627073
You can do this, but only if there is a relation defined between the two tables.  You cannot create a functioning report from two tables which are not related.  Even if you use sub reports, the tables must still be related in some way.

Unless you use sub reports, you may not be able to get the two headers you are trying to show.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 9627110
Yes you can have multiple detail sections.

I would use subreports for each table and put the subreports in separate detail sections.

mlmcc
0
 

Author Comment

by:satish_kotti
ID: 9632017
both tables have productid in common which is taken as group item.
actually there is not relation between two tables except both tables have productid as common.
 once a product comes in supermaket a product id is generated if it is new product or else existing product id will be used. this is is to tell about our fuctionality of productid.

the need is to show both the tables information  one in each detail section where sub total inquantity is shown in one group section and in  other group section subtotal of outquantity should be shown

1)incoming details headers in header section
2)incoming details based on particular  productid in first detail section
3)incoming details sub total of in quantity placed in a group footer
4)out going details headers placed  in header section
5)outgoing details based on particular  productid placed in a details section
6)outgoing details sub total of out quantity placed in a group footer
7)balance is difference of sub totals incoming quantity and outgoing quantity

the same should be repeated for all group item based on productid until there are no records  on that productid.
      please give me information  regarding  how to procede with this
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:satish_kotti
ID: 9632057
I tried sub reports but i need to break once group of  records belonging to particular incoming productid  then display subtotal of that productid inquantity then   group of  records belonging to particular outgoing productid(records belonging to same product id displayed in incoming)
then display subtotal of that productid out quantity  then balance which is difference of subtotal of in quantity and subtotals of outquantity.
      the same format to be followed for entire report until there are no productid's in the table


Please help me in this
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 9633472
Now you're talking about groups and sub-groups.  Setup a group on the ProductID, then on the field that tells you whether it is incoming or outgoing.  You may need to use a query or stored procedure to union your two tables together into a single table/view/recordset for the purposes of this report.  You haven't mentioned what db you are using, so it's hard to get too specific.
0
 

Author Comment

by:satish_kotti
ID: 9639478
i used stored two stored procedure in sql server with group by productid. actually incoming and outgoing  are two different procedures.the client needs both details to be shown in one report  but seperately one in each detail section.
       both procedures show records based on productid ie  for that product id waht all records are there they will be shown one below another.
     

1)      the details for incoming  are
productid  productname inquantity lotnumber expiration date

i haved inserted a group
there i placed the subtotal of inquantity


   2)   the details for outgoing  are
productid  productname outquantity lotnumber out date

i haved inserted a group
there i placed the subtotal of outquantity

3)i need to place balance which is difference of subtotal of in quantity and out quantity


          for example there is product id (c11 and c12) which i need to show details in following format

1)records pertaining to incoming products belonging to c11
2)subtotal of in quantity belonging to c11
3)records pertaining to outing products belonging to c11
4)subtotal of out quantity belonging to c11
5)Balance  ie difference  between suvbtotals of incoming and outgoing  quantity of c11

6)records pertaining to incoming products belonging to c12
7)subtotal of in quantity belonging to c12
8)records pertaining to outing products belonging to c12
9)subtotal of out quantity belonging to c12
10)Balance  ie difference  between subtotals of incoming and outgoing  quantity of c12

same format to be followed for all the records in both tables for all product id

how i need to proceed for gettintg this task achieved.
if iam not clear plese tell me where am not clear so taht i can make you clear at that point. eagerly waiting for the solution as how soon i can get the solution from u gurus i can deliver it to client.
            i tried using sub reports but iam not able to get the task fullfilled





0
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 63 total points
ID: 9639558
Why don't you create a third stored procedure which performs a UNION on the recordsets returned by the first two stored procedures.  Then, Crystal Reports can work as designed.

You are trying to use two unrelated sets of data.  There is nothing here to tie the two recordsets together.  Unless you introduce a table containing unique product IDs and create left joins to your two stored procedure recordsets (which I don't think you can do in Crystal Reports), you have no parent-child, master-detail relationship to work with.  Crystal Reports does not work well with disconnected, unrelated sets of data.

Can you create a new stored procedure?  If so, add a field to the recordset indicating whether or not the record is IN or OUT.  Create a group on ProductID and a second group on the IN/OUT field and you can total and sub-total all day long.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 62 total points
ID: 9641171
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question