In Crystal Reports I am looking to have a header footer then header footer with linked info but different Sums - crystal-reports

So I know it is not possible to do
header 1
detail
footer 1
header 2
detail
footer 2
But I am trying to make a form that shows
Invoices
Invoice#, Date, Status, Total, Balance Due
Info
Debits total:
Credits
Date, Reference, Total, Balance
info
Credits Total:
Balance due:
Balance due being debits - credits. I was able to get the invoices but I can not figure out how to get the Credits to show below the debits total.
Edit------------------------------------------------------------------------
Help with the below requirement aswell:
sum(case when s.[ar sale bill to] like '%wilco%'
then isnull(d.[ar saled qty requested],d.[ar saled qty]) * d.[ar saled unit price]
else 0 end) as 'Total'
I need to have a value if it is null grab to qty from [ar saled qty] any ideas?
Now I am having trouble with getting it on the same page...Detail 1 prints on page one and Detail 2 Prints on page 2. The amount of records vary but on the first record there is 3 lines in the first subreport and 1 in the second subreport.

Why don't you just separate the Debits vs Credits using a Group of Invoice Type.
That way you can just add a summary of the balance on the group footer. It should serve your purposes.

your requirement is definitely possible....
Use two sub reports in single main report where you can get desired structure
header 1 //sub report 1
detail //sub report 1
footer 1 //sub report 1
header 2 //sub report 2
detail //sub report 2
footer 2 //sub report 2
Let me know incase any issue

I figured out my report on separate pages. I was looking in the section expert and all the keep together's where checked so i knew it had to be a formatting issue. I went in and suppressed all the fields that i was not using in the subreport like report header/group header instead of just making the sections as small as they could go and that did the trick.

Related

Repeat header when footer by itself

I'm looking for some help getting a group header to repeat when the group footer is by itself on the last page. On my report, this group header is in the 4th group. The group footer is a grand total that is in the 3rd group.
Sometimes, the records are such that everything in group 4 is on a single page, but the grand total line in group 3 winds up on the next page all by itself. If that happens, I want to be able to reprint the group header from group 4 prior to this final group 3 footer.
Thanks!

Crystal Report Show Total Only On Last Page

I have a formula that calculated price total of an invoice eg. #vtotal. The invoice page could span from 1 to n page. I would like to show the total only on last page. How do I do that?
I have searched and tried on some suggestions using report footer, but it does not work as it implies, the report footer always show in tandem with page footer.
I have also tried using formula:
if PageNumber = TotalPageCount then
{#vtotal}
It still display 0 on pages with PageNumber < TotalPage Count.
How to do it correctly to only show on last page? And nothing on other.
Create group over invoice ID (or whatever field identifies invoice uniquely) and show your formula in group footer.
/edit after comments/
Alternative way is to supress some formulas in page footer section. Place your {#vtotal} into page footer (like it was initially) and create suppress formula for it, with content like
{PageNumber < TotalPageCount}
You need to somehow account for situations, when you print more than single invoice - if this is possible for your setup of course.
You Can write Grand Total in Report Footer. So it will display in only last page.

Crystal Report How to sum of field OldAmount from second table where date is less than the provide Param datefield

i have 2 table named as TB_NewBills and TB_OldPayment , TB_NewBills have colums ClientName ClientID DateofBuying NewBillAmont and ![TB_OldPayment][1] have colums cusomterName CustomerID DateofAmount OldAmount
i used 2 paramters in my report Param-clientID and Paam-date upon which i am fetching fields data and fields are displyed on reports are ClientName ClientID DateOfBuying NewBillAmount and in footer i have sum of newBillAmount
Second Part :
Problem is now i want to get the sum of column TB_OldPayment . OldAmount where TB_Old Payment . DateofAmount < param-date i cant make up with my problem i have done all up to first part please help
image link to see digram http://i58.tinypic.com/99qn7m.jpg
Thx
if you have subreports you will have to create a shared numbervar variable for TB_OldPayment where you are going to storage a running total of your OldAmount where DateofAmount < param-date. Then put that formula on your main report on report footer
if you don't have subreport just create a running total of your OldAmount where DateofAmount < param-date and put on report footer

Crystal Reports XI - Suppress group header based on suppression status of sub-groups

I have a rather simple problem that I haven't managed to workout for myself despite many hours of searching the web.
I have a report containing timestamped data from a few thousand devices (loggers), to present the data in a sensible manner, I set up two groups in the report; Loggers and Timestamp so the data first grouped by logger id and then by timestamp which is working fine
Group 1 Logger 1
Group 2 Timestamp 01/08/2012
Data...
Data...
Data...
Group 2 Timestamp 02/08/2012
Data...
Data...
Group 1 Logger 2
Group 2 Timestamp 01/08/2012
Data...
Data...
Data...
Now the data (detail) fields are hidden from the user and I only want to display the header for group-2 if there are 4 or more records in each group-2. To achieve this I have used the following suppression formula on group-2
Count ({GMAC_spDg2Report;1.tTimeStamp}, {GMAC_spDg2Report;1.tTimeStamp}, "daily") < 4
The trick is that there are certain level 1 groups where all group-2 headers are suppressed and where this is the case, I want to hide the group-1 header as well.
Using the same suppression formula as group-2 in group 1 did not yield the desired result. I have also tried to use a running total (called {#Count Unsupressed Days}) in the group-1 footer with a distinct count and the formula below being reset on each group-1
Count ({GMAC_spDg2Report;1.strLogger}, {GMAC_spDg2Report;1.tTimeStamp}, "daily") > 4
The running total works perfectly, returning a 1 in group-1 footer if the group has sub groups that are not suppressed and 0 if all group-2 headers are suppressed.
So here is the CHALLENGE, I cannot seem to apply a suppression rule in the header of group-1 using the output from the running total.
To demonstrate the problem I created a formula field containing only the output from the running total and placed this in the group-1 header.
The results are confusing to say the least... the formula field does not show the same value as the running total and hence the suppression rule is not working.
I hope this makes some kind of sense... I feel like I have tried everything
I don't have a definite solution, but using a formula field starting with
WhilePrintingRecords;
...
the formula will be processed after all records are read, and therefore you will be able to use it in section headers with correct result.
Now there is the problem of finding a formula logic that will be of use for you, but perhaps this first step can help you in the right direction.
I had a similar problem once. As I remember, the trick was to check Suppress blank section in every detail section and checking some similar sounding option Suppress blank group (?) in group header section.
Sorry I can't give you the exact name, it's long ago and I used the German version. I know it's possible without formulas, though.
I take it you don't use sub reports. If you do, note that the trick only works if the sub report has the option Suppress empty report (?) checked along with what I wrote above.

counting fields based on group in crystal report

hi all i wana ask a question about crystal reporting in vs 2008
lets say i have a report with these data
customer_ID Customer_Name Order_amoont Order_Date
(#group1 VipCustomer)
1 xyz 3 1/1/2010
2 abc 4 2/2/2010
5 sds 21 3/12/2009
(#Group2 NormalCustomer)
3 tyt 2 3/3/2010
4 ha 4 21/3/2009
i want only to display records where Order_Date year is in 2010 only so i went to the section expert and i added a condintion in suppress formula Year(order_Date)=2010 and i get the result ,,the question is how to count how many vip customers ordered in 2010 only and how many normal customer order in 2010 only ,,then i want the total number of both type of customers to be displayed to have a report like that::
customer_ID Customer_Name Order_amoont Order_Date
(#group1 VipCustomer)
1 xyz 3 1/1/2010
2 abc 4 2/2/2010
subtotal 2
(#Group2 NormalCustomer)
3 tyt 2 3/3/2010
subtotal 1
total 3
i know that answer ,and i will answer it
1-make a conditional formula field and add to it this condtion
if year(Order_Date)=2010 then 1
2-then add summary to the formula filed
--to get total place this summary in the report footer
--to get sub-total place this symmary in group footer
there is also another way to do it
by using running total field and it evaluate section us the formula year(Order_Date)=2010
then to get total place the running field in report footer
to get sub-total make a new running field the same as the 1st but in the reset section check on reset of change of group and place this field in group footer
thnx