My specific question this time:
OK, what I want to do is this - for each record in my query, there's a field with a Boolean true/false. In the Group Footer of my report, I want to have a count of just the FALSE records. How the heck do I do this?
I can't seem to attach an IF to a COUNT. I can't see to attach a WHERE to a COUNT.
The only things it will let me do are these:
Count (fld, condFld, cond)
where fld is the field, condFld is what you group it by, and cond another thing you group it by. (This is making no sense to me - it's like subtotal in Excel, telling the thing where to put the subtotals in.)
Anyone have any ideas? I've tried every bit of SQL code I know (and some others have suggested) in the function and formula workshop, but can't seem to do it.
― MIS Information (kate), Thursday, 14 July 2005 15:54 (twenty years ago)
select stuff, count (stuff) from table group by stuff having stuff=false?
I was doing this not half an hour ago - this works shurly?
What errors does it tell you?
― Come Back Johnny B (Johnney B), Thursday, 14 July 2005 16:18 (twenty years ago)
I can't do it as a query, I have to do it as a subtotal for a group.
I'm trying right now to convert my TRUE/FALSE into 0/1 and then do a SUM which is what I ended up doing in Excel.
― MIS Information (kate), Thursday, 14 July 2005 16:21 (twenty years ago)
― koogs (koogs), Thursday, 14 July 2005 16:21 (twenty years ago)
Good idea.
― Jon, remind me again why you haven't drowned in your own vomit (ex machina), Thursday, 14 July 2005 16:23 (twenty years ago)
SQL, Crystal...this is my daily bread and butter. Dull, isn't it?
― Felix Leiter (nordicskilla), Thursday, 14 July 2005 16:23 (twenty years ago)
― Jon, remind me again why you haven't drowned in your own vomit (ex machina), Thursday, 14 July 2005 16:26 (twenty years ago)
― MIS Information (kate), Thursday, 14 July 2005 16:26 (twenty years ago)
― Jon, remind me again why you haven't drowned in your own vomit (ex machina), Thursday, 14 July 2005 16:27 (twenty years ago)
I took Crystal training and they showed as all of these sexy features...none of which I ever need to use on my job. We mostly just run canned reports with a few minor SQL modifications.
Is there...much call for this kind of work in London? Just curious.
― Felix Leiter (nordicskilla), Thursday, 14 July 2005 16:29 (twenty years ago)
There is tons of call for this in London, Adam. I'm just glad I've got a job where I am able to learn Oracle, Crystal Reports, etc. because if you know it, there's so much work.
I was trying to find work earlier with just Access, ACT and bits of SQL and had diminishing returns. Learn Crystal and you are the mang as far as recruiters are concerned.
― MIS Information (kate), Thursday, 14 July 2005 16:31 (twenty years ago)
― Felix Leiter (nordicskilla), Thursday, 14 July 2005 16:32 (twenty years ago)
― mark p (Mark P), Thursday, 14 July 2005 16:36 (twenty years ago)
― Come Back Johnny B (Johnney B), Thursday, 14 July 2005 16:56 (twenty years ago)
― Rufus 3000 (Mr Noodles), Thursday, 14 July 2005 17:12 (twenty years ago)
[evil laugh]
― Forest Pines (ForestPines), Thursday, 14 July 2005 17:44 (twenty years ago)
(However, while falling asleep last night I thought of a more... elegant way of calculating the count.)
― MIS Information (kate), Friday, 15 July 2005 06:34 (twenty years ago)
― Ed (dali), Friday, 15 July 2005 06:43 (twenty years ago)
― MIS Information (kate), Friday, 15 July 2005 06:47 (twenty years ago)
Somewhere in my old Oracle database it does this... before I go insane trying to dig it out, has anyone else done this in Crystal?
Forest? Adam?
― Ancients of LAUTRO (kate), Wednesday, 14 September 2005 13:47 (twenty years ago)
PROCEDURE clear_production_report (chosen_date IN DATE DEFAULT SYSDATE)ISBEGIN EXECUTE IMMEDIATE ('TRUNCATE TABLE PRODUCTION_REPORT REUSE STORAGE'); INSERT INTO PRODUCTION_REPORT (TEAM, DATA_GROUP, VALUE_1, VALUE_2, VALUE_3, VALUE_4, COUNT, UPDATED) SELECT 'DATE' TEAM, TO_CHAR(TRUNC(CHOSEN_DATE,'DD'),'DD/MM/YY') DATA_GROUP, COUNT(*) WORKING_DAYS, TO_CHAR(ADD_MONTHS(TRUNC(chosen_date,'Q'),0),'MM'), TO_CHAR(ADD_MONTHS(TRUNC(chosen_date,'Q'),1),'MM'), TO_CHAR(ADD_MONTHS(TRUNC(chosen_date,'Q'),2),'MM'), SUM(DECODE(ISGREATER(DATES.SELECTED_DATE-TRUNC(CHOSEN_DATE,'DD'),0),1,0,1)) Day, SYSDATE UPDATED FROM SYSADMIN.DATES WHERE DATES.SELECTED_DATE BETWEEN TRUNC(chosen_date,'MM') AND LAST_DAY(TRUNC(chosen_date,'MM')) AND WEEKDAY NOT IN ('Saturday','Sunday') AND BANK_HOLIDAY = 'N'; Insert_Proc ('CLEAR_PRODUCTION_REPORT',chosen_date,'SUCCESS',SQLCODE); COMMIT;EXCEPTION WHEN OTHERS THEN Insert_Proc ('CLEAR_PRODUCTION_REPORT',chosen_date,'FAILURE',SQLCODE);END clear_production_report;
― Ancients of LAUTRO (kate), Wednesday, 14 September 2005 13:52 (twenty years ago)
― Ancients of LAUTRO (kate), Wednesday, 14 September 2005 13:55 (twenty years ago)
― Ancients of LAUTRO (kate), Wednesday, 14 September 2005 14:15 (twenty years ago)
Sum the number of days in the month where the day in the week was 1-5 (or is it 2-6 I forget). Subtract holidays where appropriate with decode/if setting a value = -1.
― Rufus 3000 (Mr Noodles), Wednesday, 14 September 2005 14:17 (twenty years ago)
― Ancients of LAUTRO (kate), Wednesday, 14 September 2005 14:19 (twenty years ago)
― Rufus 3000 (Mr Noodles), Wednesday, 14 September 2005 14:21 (twenty years ago)
― Ancients of LAUTRO (kate), Wednesday, 14 September 2005 14:24 (twenty years ago)
I feel slightly bad as I've been namechecked, but I have absolutely no idea.
― Forest Pines (ForestPines), Wednesday, 14 September 2005 14:34 (twenty years ago)
How can I set up a freeform sized report? i.e. one that is not bound to the printer page sizes for its width. I'm designing a report for export only, which will never be printed, so it doesn't matter WHAT the page size is. But still, it won't let me go over the boundaries of what the printer setup is.
Is this even possible?
― Paranoid Spice (kate), Tuesday, 18 October 2005 10:41 (twenty years ago)
― Paranoid Spice (kate), Tuesday, 18 October 2005 10:55 (twenty years ago)
― salexander / sophie (salexander), Tuesday, 18 October 2005 11:09 (twenty years ago)
― Forest Pines (ForestPines), Tuesday, 18 October 2005 11:10 (twenty years ago)
― Paranoid Spice (kate), Tuesday, 18 October 2005 11:11 (twenty years ago)
― Forest Pines (ForestPines), Tuesday, 18 October 2005 11:13 (twenty years ago)
― Jonothong Williamsmang (ex machina), Tuesday, 18 October 2005 11:21 (twenty years ago)
― Munki (nordicskilla), Tuesday, 18 October 2005 21:40 (twenty years ago)
― gygax! (gygax!), Tuesday, 18 October 2005 22:33 (twenty years ago)
― gygax! (gygax!), Tuesday, 18 October 2005 22:34 (twenty years ago)
On the whole, I've really started to appreciate Crystal. Now I know its foibles, it's a really versatile tool. Would still like to be able to script my own queries, but still.
― Paranoid Spice (kate), Wednesday, 19 October 2005 07:20 (twenty years ago)
I'm going to have to link my SQL database to an Access database in order to build more advanced queries and archive datacube data - but Access report builder is such a sucky tool.
Surely I should be able to hook up a pretty pretty Crystal report to it? I hope?
― Streatham's Paisley Princess (kate), Wednesday, 9 November 2005 16:08 (twenty years ago)
― Jdubz (ex machina), Wednesday, 9 November 2005 16:16 (twenty years ago)
― Streatham's Paisley Princess (kate), Wednesday, 9 November 2005 16:35 (twenty years ago)
― Streatham's Paisley Princess (kate), Wednesday, 9 November 2005 16:37 (twenty years ago)
― Jdubz (ex machina), Wednesday, 9 November 2005 16:38 (twenty years ago)
― dog latin (dog latin), Wednesday, 9 November 2005 16:39 (twenty years ago)
― Streatham's Paisley Princess (kate), Wednesday, 9 November 2005 16:40 (twenty years ago)
― a passing spacecadet, Friday, 9 March 2007 15:50 (eighteen years ago)