Click here to Skip to main content
15,887,421 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have generated a SQL query which contains the information of Purchase & Production information.

Using this SQL query, I want to develop a crystal report layout with parameters set as data range.

If my client selects the data range he needs this Purchase Vs production report based on each production document in separate page.

This is how my SQL Query output looks like:

FLAG         DOC NO DOCUMENT DATE   VENDOR  ITEM    QTY PRICE   TOTAL
PURCHASE       1    10/11/2019       ABC    RM      100   10    1000
PRODUCTION     1    10/11/2019       NULL   FG001     50   5     250
PRODUCTION     1    10/11/2019       NULL   FG002     25  7.5   187.5
PURCHASE       2    11/10/2019       CBD    RM02      75   15   1125
PRODUCTION     2    11/10/2019       NULL   FG005     75   25   1875
I need to build a crystal report like this:

In first page, I should get the information of first production document: 1

Purchase:
PURCHASE    1   10/11/2019  ABC RM  100 10  1000

Production:
PRODUCTION  1   10/11/2019  NULL    FG001   50  5   250
PRODUCTION  1   10/11/2019  NULL    FG002   25  7.5 187.5
And in second page like the above format, I should get in the next page.

I used the grouping option & Grouped using the Flag field in a specified order.

But after providing the data range & run the report, I am getting the result like this:

Purchase:
PURCHASE    1   10/11/2019  ABC RM  100 10  1000
PURCHASE    2   11/10/2019  CBD RM02 75 15  1125

Production:
PRODUCTION  1   10/11/2019  NULL    FG001   50  5   250
PRODUCTION  1   10/11/2019  NULL    FG002   25  7.5 187.5
PRODUCTION  2   11/10/2019  NULL    FG005   75  25  1875
How do it spit the both document into separate page in Crystal report


What I have tried:

I have performed group based on Flag field & have used specified order to arrange it like
Purchase
Production
But still I am not getting the desired output like it needed
Posted
Updated 14-Oct-19 8:50am

1 solution

It's a long time since I've had to touch Crystal Reports, but based on your data, you need to group by DOC NO first; then add FLAG as a subgroup. (You might need to use the "group expert" dialog to do this.)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900