Anyone on here know Crystal Reports?

I know a few of you are in the computing/software field like I am. Do any of you have experience with Crystal Reports? The specific problem is that I need to get a week of dates (Sun-Sat) from one date (that can be any day of the week).

Any help is appreciated, thanks.

Granmassax is the elite crystal reports whoooooooooooooooore ;D

I’m a crystal/sql programmer… ;D

I have a DATE table that gives me all that good stuff so I don’t have to calculate it.

There is probably an easier way to do it, but this does work.

forumla “week start”:
if (DayOfWeek ({?DATE})) = 1 then {?DATE} - 0
else if (DayOfWeek ({?DATE})) = 2 then {?DATE} - 1
else if (DayOfWeek ({?DATE})) = 3 then {?DATE} - 2
else if (DayOfWeek ({?DATE})) = 4 then {?DATE} - 3
else if (DayOfWeek ({?DATE})) = 5 then {?DATE} - 4
else if (DayOfWeek ({?DATE})) = 6 then {?DATE} - 5
else if (DayOfWeek ({?DATE})) = 7 then {?DATE} - 6

formula “week end”:
if (DayOfWeek ({?DATE})) = 1 then {?DATE} + 6
else if (DayOfWeek ({?DATE})) = 2 then {?DATE} + 5
else if (DayOfWeek ({?DATE})) = 3 then {?DATE} + 4
else if (DayOfWeek ({?DATE})) = 4 then {?DATE} + 3
else if (DayOfWeek ({?DATE})) = 5 then {?DATE} + 2
else if (DayOfWeek ({?DATE})) = 6 then {?DATE} + 1
else if (DayOfWeek ({?DATE})) = 7 then {?DATE} + 0

things may get messed up depending on how your dates are formatted, but give it a try.

I’d kill myself if I did Crystal all day.

I’d kill myself if I did any one thing all day

Some h0t slut? You are ze ghey.

too much of a good thing can be bad… i think… or so they say…f u!

You are my hero. My boss loves you too.

I’m ussually doing web/app programming but we’re in a time crunk so web is put on the back burner over Crystal…and I hate it.

Don’t go too far, I’m bound to have another question. I jumped into crystal only 2 days ago.

Hope ya enjoy the Crystal licensing.

dont hate on crystal. It’s a hell of a tool for pulling data/reports together. Pair it together with some nice stored procedures and its extremely efficient.

It’s fantastic. The licensing is not. A lot of my clients are pushing towards MS Reporting.

I leave work in half an hour ;D

I don’t deal with that, managment does.

Damn, oh well, I’ll leave questions for tomorrow then. :lol

I hate crystal so far for one reason. I can’t just write SQL and plug it in. I wouldn’t mind if I had to make sure column names etc matched up perfectly and what not. I know exactly how to do all the reports I need to do in SQL…but can’t do diddly in Crystal. Its so idiot proof that its expert proof.

can’t you write a stored procedure then point the crystal report to that instead of a table(s)?

Correct.

You are a web programmer. Use SQL and get your own datasets and interface with Crystal.

I wrote a report / query interface that did just that. Created dynamic queries via the user creating what fields / search criteria, got the data set, and sent it over to my Crystal Report for display.

K…got a question that I kno there has to be an obvious answer for. Using forumla fields in a formula…I need to select records in that date range.

EDIT2: Nvm, figured it out. {@weekStart} Knew it was obvious.

I have no idea. I didn’t do any of the database setup. I came onto the project a year and a half into it. Was originally brought in to just do web shit (they didnt want to pay to train someone).

Not sure what you mean here. The reports I’m doing are not going on the web, they are part of an application, and are deff a last minute addition.

EDIT: Nvm, I think I get what you are saying. Write a window/page to do all the work for me. Sadly we go live in 7 (well, almost 6 now) days and do not have the time to get that finished.

I meant the application, I shouldn’t have said web.

The data has to come from somewhere. I don’t have Crystal installed on this machine to check. I BELIEVE you have the ability to interface with a DB to get table data or run a Stored Procedure. For more flexibility, I created XML and used that to create my Crystal Report. In my application, I basically got my data from a SQL Connection or Oracle Connection (Doesn’t matter) and then just serialized to that XML and then opened the Crystal Report with that XML as source and it renders accordingly. Many many ways you can handlel it.

But live in 6 days ain’t happening. Man, you should have had code freeze awhile back :frowning:

Where you work man?

Center of Transporation Excelence in Buffalo. Dead end job for me, but damn great pay and experience for still being in school. I’m gonna start looking for a new job this fall.

And I kno. Friday was the code ‘freeze.’ 3 guys are fixing bugs, 1 is setting up the servers, and I’m doing reports because someone forgot about them. It’s gonna be a super long week.

if you only have a few reports that need to get done and your data tables aren’t HUGE then just using crystal will be fine. Stored procedures will benefit you greatly when you are dealing with a bunch of different tables and hundreds of thousands of records.

Crystal will generate the SQL if you ever wanted to check it in the backend. Click on the “Database” option on the top and then click “show SQL query”

I know about checking the SQL, been doing that. I hate the garbage it spits out most of the time tho.

And right now we aren’t talking large numbers. In 6 months, it will be huge. I will look into using sprocs to do this once I have the time.

Any books/classes you recommend for learning this stuff? I’d like to actually know it so I can throw it on my resume.