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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return period amount for current and previous fiscal year

Status
Not open for further replies.

sue1127

Programmer
Jul 10, 2000
88
US
I have a Crystal 8.0 report that is running off a stored procedure(SqlServer 7.0). The stored proc is returning the period amount for the current fiscal year, but not for the previous fiscal year. I subtract 1 from the current fiscal year to get it to return last_fiscal_year, and it does do that, but it does not return the corresponding period amount.

Can anyone suggest a solution?

Thanks very much,

Sue
 
Find the error in the SP and fix it.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Actually, the stored procedure returns the correct information when run through Infomaker, so I'm guessing there's probably not an error there to find. However, it returns 0's to the Crystal Report.

By the way, I've posted questions several times to Tek-Tips, but I haven't previously received a reply as rude as yours. I would suggest that if you don't have anything helpful to say, you refrain from saying anything.
 
Glad you found the source of the problem. Yeah, I was thinking it might be a Crystal Report issue but since you didn't give the Infomaker hint, I guessed wrong, sorry.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Sue,

Sometimes it's easy to get impatient with questions that don't provide enough information. I've had to bite my own tongue many times, and been red-flagged when I didn't manage that. Please don't hold it against us when sometimes we get a little short. Just call it "a bad day" and know that we do try our best to provide assistance!

I would love to help you, but I can't imagine what could be the problem. If the SP works from one client app but not another, then the problem is probably in the client and not in the SP. Have you considered calling the manufacturer of Crystal Reports? Could it be a timeout or network problem?

-------------------------------------
It is better to have honor than a good reputation.
(Reputation is what other people think about you. Honor is what you know about yourself.)
 
I know nothing about Crystal nor Infomaker, but could the situation be that you are changing the sp (or query based on it, which query is input for Crystal) and producing a new amount column alias called amount_last_fiscal_year. And Crystal's report generator is expecting for column called amount_fiscal_year. Can you see what my point is. Maybe Infoview works, because it just takes the n first columns and reports gladly your new amount.

Could you run the sp seperately for instance in Query Analyzer and see if it works correctly. I din't get it where you are doing the subtraction -1.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top