Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula on Report Crystal Reports Peachtree complete

Status
Not open for further replies.

vree

IS-IT--Management
Dec 31, 2002
49
US
I have a report that is a parameter set up on {?GL DATE}

I want on opening balance for the close of the day before.

I have tried this:
Sum({JrnlRow.Amount}) =({GL DATE})-1
and
Sum({JrnlRow.Amount}) =({@GL DATE})-1

no luck, I am sure I don't know syntax or something. ANY help would be most appreciated.

 
From the design window, just right click the field {JrnlRow.Amount} select insert, summary and pick the field {JrnlRow.Date} as your field to group by. No Formula required for this simple summary.

If you want your report to include ONLY records from the data prompted, then write a record selection formula. Click on report, edit selection formula, record and enter the following:

{JrnlRow.Date}={?GL Date}

I am unsure what you were trying to accomplish with the -1 on your parameter field. Hopefully this will get you started and if you have any more questions please post them here.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Sorry, but I have never used CR before, however let me try to be more clear
I set up a report that runs based on a date choice, hence GL DATE is the parameter field.( you open the report, click on the parameter field, click the lightning bolt, choose your date)

I have inclued in my report the Amount field from JrnlRow tbl. {JrnlRow.Amount}

I have a nice sum and grand total at the bottom for JrnlRow
{Sum JrnlRow.Amount}

Which works fine and looks like it is returning all correct amounts.

All I wanted was an opening balance at the top of the report. Hence the -1, (Date minus 1) ie the opening Bal for today = the closing bal for yesterday. I apologize, I am very new to CR.
Thank you for your help.

Essentially I started out wanting a report exactly like the General Ledger report in PT, that could be filtered by a single date, rather than by a "period". So, in trying to design that, this is where I am in regards to CR.
 
I think you would have to use a record select that included yesterday's information as in:

{GL.date} >= {?GLdate}-1 and
{GL.date} <= {?GLdate}

Group on {GL.date} and then conditionally suppress the group header and details sections by going to format section -> header ( and then details)->suppress->x+2 and enter:

{GL.date} < {?GLdate}

If you want the summary of yesterday's data to appear with the text &quot;Opening Balance: &quot;, then enter this in a text box in the group footer, and conditionally suppress the field by right clicking on the text box->format field->suppress->x+2 and enter:

{GL.date} = {?GLdate}

-LB
 
Ok, now I understand better.

In your case, if you have a record selection formula that is only looking at the transactions that = the parameter field, that SAME FORMULA would always make your attempt to get a sum of the records prior to that date evaluate to zero. After all, you have excluded thsoe records from the report entirely.

If you want to this, you will need to have a subreport that pulls in the records prior to the GL date and then used shared variables to create your the sums of the prior activity and the current GL date activity for your report.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Ok thank you now I can sit down and cry, at this point, that is beyond me. I appreciate your time though.
 
Or you could ask for further help. People are pretty willing to spend the time...

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top