Crystal Reports

Politics, Religion, Retards, and Rape Factories.

Moderators: pablo banquo, Gobo, Bag of Ass, SporkAndrew

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Crystal Reports

Postby Jat » Fri Jan 21, 2005 6:15 pm

I hate Crystal Reports.
It's not like they're too difficult to use - that is, until you try to do something decently complex (without having any sort of training or experience with them). So I'm sitting here trying to use .net, xml, and CR to string together a reporting procedure for a db.

I've been racking my brain for too long and I'm sick and tired of this mental melt that keeps happening when I attempt to apply the convoluted solutions that I keep coming up with.

No chance anyone in here knows that much about CR eh? I'll buy you stuff if you help me.

User avatar
Tweeg
The Artist Currently Known As Tweeg
Posts: 3779
Joined: Mon Aug 26, 2002 2:10 am

Postby Tweeg » Fri Jan 21, 2005 8:13 pm

I'll see if I can find a old tutorial I had on CR, maybe that would help you out because it was pretty extensive.
"He who seeks to fight trolls must take care; when you laugh at the Tweeg post, the Tweeg posts laughs at you." - OMGBEES

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Fri Jan 21, 2005 8:46 pm

I think the biggest problem that I'm having is that I keep running into "Hey you do well with object oriented stuffs... you've never used any of this but hey - it's what you will be using"

Benefit to that is I get to increase my value by learning new things,
Down side is that results are expected post haste.

User avatar
Rob
Oh yes.
Posts: 6715
Joined: Sat Aug 24, 2002 6:03 pm
Location: Nantwich, Cheshire, UK
Contact:

Postby Rob » Sat Jan 22, 2005 1:48 am

Sorry Bud, no help. I managed to bum a client off of CR and onto doing things in native Delphi code. I only ever had to support one batch of CRs, and that was years ago, and we binned the originals p.d.q.

But I can offer tea & sympathy in droves if you need it.

User avatar
Tweeg
The Artist Currently Known As Tweeg
Posts: 3779
Joined: Mon Aug 26, 2002 2:10 am

Postby Tweeg » Sat Jan 22, 2005 1:50 am

ugh I can't find it, I had to do a format recentally and I guess I didn't back it up.

If you have the latest VB.NET I thought that there was a crystal reporting wizard in there ... umm yah if i can find a copy of that pdf i was looking for I'll send it your way
"He who seeks to fight trolls must take care; when you laugh at the Tweeg post, the Tweeg posts laughs at you." - OMGBEES

User avatar
Bunyip
I AM ERROR
Posts: 4880
Joined: Wed Sep 04, 2002 3:42 pm
Location: Baconham

Postby Bunyip » Mon Jan 24, 2005 3:25 am

I had some expertise in Crystal Reports once, but I did my best to forget it. The disadvantage to knowing Crystal Reports is that then people expect you to work with Crystal Reports. Ugh.

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Mon Jan 24, 2005 1:37 pm

I wonder if CR will ever figure out that they're a complete pain in the ass. Maybe it's just a brain problem that I have, but I just can't see how to apply a static report against dynamic data. This doesn't sound too bad until actually try to do it.

I want
Parent info
\
Child Info
\
Gchild Info
...
And when I pull together the data to be used I have no way of knowing how many levels deep it goes. Before when I was building a 1 level 'Parent Info Only' type report, creating the XML to create the report with and then filling it all in with an sql query wasn't too bad.

Anyone have any ideas on how to do this? Implementation is something I can work on - I think I"m out of ideas.

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Tue Jan 25, 2005 5:31 pm

Looks like I ended up building a temp table that just inserts everything into one table in the order they should be seen.

Now...

tell me what I'm doing wrong here...

Code: Select all

        Dim Pfield As ParameterField = New ParameterField
        Dim pdvalue As ParameterDiscreteValue = New ParameterDiscreteValue
        Pfield.ParameterFieldName = "TimeStamp"
        Pfield.ParameterFieldName = "TimeStamp"
        pdvalue.Value = 'Stuffs to lookup in database'
        Pfield.HasCurrentValue = True
        Pfield.ParameterType = ParameterType.QueryParameter
        Pfield.CurrentValues.Add(pdvalue)
        MyCRV.ParameterFieldInfo.Add(Pfield)
        MyCRV.ReportSource = Report



Granted that I have a parameter set up in my report and I have the Field is equal TimeStamp in the select expert.

User avatar
Rob
Oh yes.
Posts: 6715
Joined: Sat Aug 24, 2002 6:03 pm
Location: Nantwich, Cheshire, UK
Contact:

Postby Rob » Tue Jan 25, 2005 7:12 pm

I know jack about what you're doing but....

Isn't "timestamp" a reserved word in most modern DBs? Can you really have a field called "timestamp"?

Is that what it's doing, or am I just guessing wrong?

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Tue Jan 25, 2005 7:23 pm

well, in the database it's called sTimestamp, and in the report as a parameter it's called TimeStamp (which I should've called it pTimeStamp just to be a good boy)

turns out that what I needed to do was

Code: Select all

dim pvalue as parametervalues
dim pdvalue as parameterdistinctvalues
pdvalue.value = "Search for me in the DB"
pvalue.add(pdvalue)
Report.DataDefinition.ParameterFields("TimeStamp").ApplyCurrentValues(pvalue)


This of course may not be the only solution - but it's one of them.
Now I just have to change it so that

Code: Select all

if postback then
'I don't have to buggerin repopulate the DB'
end if

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Tue Feb 15, 2005 7:30 pm

Speaking of begging for programmatic help - here's a simple javascript question for you web gurus out there...

Parent window with a listbox named (for simplicity's sake) L1 on Form F1. This window pops a child open with a second list L2 on a second form F2, user selects an option from list 2, clicks a button and then it creates itself as an option in L1.

Parent window is .aspx, child is .asp (not that it matters - I think)


Code: Select all


frm = window.opener.document.F1;         
sNew = frm.Parts.value;           

for (var k=0; k < F2.L2.length; k++)   
{                       
if (F2.L2.options[k].selected == true) 
{                         
len = F1.L1.length;
F1.L1.options[len]= new Option(F2.L2.options[k].text);
F1.L1.options[len].value = F2.L2.options[k].value;
}
}


unknown exception...
and I'm getting frustrated.

User avatar
Bunyip
I AM ERROR
Posts: 4880
Joined: Wed Sep 04, 2002 3:42 pm
Location: Baconham

Postby Bunyip » Tue Feb 15, 2005 9:48 pm

My guess is you have to do an options.add there before putting in your new element. It might not add the [len] element automatically. So something like

oNewElement = new Option(F2.L2.options[k].text);
F1.L1.options.add(oNewElement);
F1.L1.options[len].value = F2.L2.options[k].value;

Edit: wait, is it called F1 in your code? You've declared it as frm there at the top.

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Wed Feb 16, 2005 12:14 am

in my code all of them are actually frm - I just missed that one in the translation.

I've tried to create the new one and assign it - and I'm always getting that oh so helpful unspecified error.
I can't create any new <option>s in the select statement - I can do reassigns to what's there no prob.

The worst days at work are the ones where I don't seem to get anything done. They bug me.

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Wed Mar 16, 2005 7:56 pm

So everything's been running fine - Crystal Craps out once in a while, no big worries.

Today I had a presentation to show all of the work that i've completed as we move into Alpha testing. Guess what, crystal has fits and I have to drag my dev box into the boardroom and look like a tool.

"No it's not quite ready for testing since there are unknown gremlins in the system currently"

turns out that it's crystal.

*shakes fist*

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Thu Apr 07, 2005 3:07 pm

I'm back to working on the Crystal Reports that I created a while ago. Nothing hard this time, just formatting. But I ran into a retarded problem.

.net 03 has a built in designer for CR. No big deal there. The issue comes up when you want to design a report that'll print out in landscape you have to go into the designer and change the printer settings.

This didn't seem like the option that i was supposed to be changing at design time, so I've been looking around for a day and a half to find this stupid little change that had to be made before I could continue with my least favorite work activity - report formatting.

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Thu Apr 07, 2005 3:11 pm

Also, this thing I've been working on is finished (or in alpha at least).

I go to demo the system after my boss bulk loaded a bunch of stuff into the db that I've been using. So he loaded in a bunch of values that broke my presentation for a specific record that I looked up by inserting null values into the db where my code hadn't trapped for null. Since the data that I've been working on had never been null.

I suppose it's my fault for not setting up the db more strictly / not creating an easy function such as

function foo ( byval a as object) as string
if isdbnull(a) then
return ""
else
return a
end if
end function

to make sure I was always handling strings.

Oh well. All is fixed now. I just looked like a tool.
As long as I have a job on perpetual tomorrow I'm not too pissy.

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Thu Apr 28, 2005 1:57 pm

This should be easy, so maybe I'm just an idiot and you guys can point me in the right direction here.

I'm looking up fields a b c and d.
b,c,d have repeating information - no problem, field a also has repeating information but I want to suppress if it's duplicated.

So I go to suppress if duplicated for section a and all it does is leave a little blank spot where a would've been for that entry. Also I've tried length(a) = 0 on the x-2 field for a suppression formula.

so I've a few questions...
1) Does the x-2 button modify the checkbox for 'suppress if duplicate' or is it in addition to.
2) How should I go about suppressing an entire row based on 1 entry's data?

(Currently I have the section suppressing if blank, a suppressing if duplicated, and b,c,d with a formula in the x-2 box with the suppress if duplicated checked)


PS I hate Crystal Reports. This shouldn't be that hard.

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Thu Apr 28, 2005 2:31 pm

HuHAH! I have triumphed.

Since I wasn't able to use any formulas involving isnull() or length() I just checked if previous({field.A}) = {field.A} then true else false

This worked.

Bastards, this shouldn't've been this hard.

Jat
Forum Jesus
Posts: 1563
Joined: Sun Aug 25, 2002 8:12 pm
Location: Cincinnati, Ohio

Postby Jat » Tue May 17, 2005 1:56 pm

Anyone know if throttling is possible on MySql dbs so a single user can only use so much db power?


Return to “Angry Thoughts”

Who is online

Users browsing this forum: No registered users and 1 guest