Some CFML Stuffs Me Do

From: Peter (BOUGHTONP)13 May 2011 02:14
To: Ken (SHIELDSIT) 53 of 75
Um... interesting question.

Not really sure at the moment - would depend what the data to compare against was like.

If it's just standalone data, I'd probably go ahead with one table:

code:
 
CREATE TABLE wood_costs
( species VARCHAR(30) NOT NULL
, thickness TINYINT NOT NULL
, cost      SMALLINT DEFAULT NULL
);
 
INSERT INTO wood_costs ('Red Oak',3,85);
INSERT INTO wood_costs ('Red Oak',4,85);
...
INSERT INTO wood_costs ('Hard Maple',7,135);
...
INSERT INTO wood_costs ('Other Hardwood',16,285);
 


Then extract distinct species and loop through ordered by thickness for outputting cost.

Though some might argue for three tables (with IDs for species and thickness to avoid duplicating data), but not sure that makes practical sense here.

I'm now a bit paranoid that I'm missing the point entirely in what you're asking, and you actually meant something else? :S
From: Ken (SHIELDSIT)13 May 2011 02:17
To: Peter (BOUGHTONP) 54 of 75
No, you understood it perfectly. And that's what I thinking. Just have to either loop through and compare or compare with the sql statement right?
From: Peter (BOUGHTONP)13 May 2011 02:19
To: Ken (SHIELDSIT) 55 of 75
Probably better to compare actual data than SQL statements.
From: Ken (SHIELDSIT)13 May 2011 02:21
To: Peter (BOUGHTONP) 56 of 75
Sweet. Wish I had the proper ports forwarded on my server so I could show you the report. I might get around to that some day.
From: Ken (SHIELDSIT)16 May 2011 19:18
To: Peter (BOUGHTONP) 57 of 75
How do you center a page in XML? I tried <center></center> and it threw a bitch fit.
From: Peter (BOUGHTONP)16 May 2011 22:42
To: Ken (SHIELDSIT) 58 of 75
Well you don't use <center></center> at all for anything, really, because that's not even real HTML.

And you don't "center a page in XML" because XML, in general, describes data rather than layout/formatting, so doesn't have a concept of centering.

To give you a useful answer, I need more information.

What are you actually using - is it XHTML, is it file.xml with a related file.xslt, or is it something else?

Do you mean center like this:
I am centered text
in a left-aligned box.


Or like this:
I'm a centered box,
with left aligned text
From: Ken (SHIELDSIT)17 May 2011 13:20
To: Peter (BOUGHTONP) 59 of 75
Why are the center tags not proper html?

I'm try to do the 2nd example you posted there.

I have a report made and I would like the whole thing centered on the page.

This is an example of the code that I can see.

code:
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
  <AutoRefresh>0</AutoRefresh>
  <DataSources>
    <DataSource Name="KilnData">
      <DataSourceReference>KilnData</DataSourceReference>
      <rd:SecurityType>None</rd:SecurityType>
      <rd:DataSourceID>0915e801-0c00-4013-a86a-3762972008de</rd:DataSourceID>
    </DataSource>
From: Peter (BOUGHTONP)17 May 2011 14:19
To: Ken (SHIELDSIT) 60 of 75
Because proper HTML is for describing the meaning, not what it looks like (that's what CSS is for).

If this was anything other than Microsoft, I'd say you have an XSLT file somewhere, which transforms that XML into HTML, and you would just need to locate that file and set the left and right margins to "auto" (and assign a fixed width) and the report would be centered.

(That box above was simply <div style="background-color:silver; width:350px; margin:auto;">I'm a centered box,<br />with left aligned text.</div>)

But - because it's Microsoft - they've probably invented their own way of doing it, just because that's what Microsoft does.

And it looks like they have, with their RDL thing. So what you need to do is read their documentation on Layout / Page and see if you can set LeftMargin and RightMargin to auto, or if you need to calculate explicit values to use.

Didn't you mention you had a book on SSRS? This is probably mentioned in there somewhere.
From: af (CAER)17 May 2011 14:37
To: Peter (BOUGHTONP) 61 of 75
XML is great, isn't it? It's so enterprisey.
From: Peter (BOUGHTONP)17 May 2011 14:41
To: af (CAER) 62 of 75
If by "enterprisey" means "bloated worthless shite that appears better on paper but actually takes ten times as much effort to do anything with because it was designed to solve the wrong problem", then yes, it is.
EDITED: 17 May 2011 14:41 by BOUGHTONP
From: af (CAER)17 May 2011 14:46
To: Peter (BOUGHTONP) 63 of 75
That's a nicely enterprisey definition, well done! :D

(although I think adding a few terms like 'blue-sky' and 'process-driven' or maybe 'social media' could corp it up a bit)
From: Ken (SHIELDSIT)25 May 2011 20:08
To: ALL64 of 75
FUCKKKK I have a real fucking strange issue going on with a report I made. And I would like to get a fresh set of eyes on it, but it will be pretty hard to get all the relevant data posted so you would even understand what the fuck I'm talking about. GRRRRRRRRR I hate life.
From: Ken (SHIELDSIT)31 May 2011 16:44
To: Peter (BOUGHTONP) 65 of 75
Have you ever used the CF Report Builder?
From: Ken (SHIELDSIT)31 May 2011 18:00
To: ALL66 of 75
Has anyone checked on PeeB lately? I think his chair attacked him, causing him to fall, and not be able to get up!
From: Peter (BOUGHTONP) 2 Jun 2011 15:47
To: Ken (SHIELDSIT) 67 of 75
My chair did not attack me!

It would never do such a thing to me. :@
From: Ken (SHIELDSIT) 2 Jun 2011 15:48
To: Peter (BOUGHTONP) 68 of 75
Well that was the only logical explanation!
From: Peter (BOUGHTONP) 2 Jun 2011 15:49
To: Ken (SHIELDSIT) 69 of 75
And no, not used CF Report Builder, fortunately.

With CF8/9 Adobe did (attempt to) make it non-shit, but I've not had any reason to see if they succeeded.
From: Ken (SHIELDSIT) 2 Jun 2011 15:50
To: Peter (BOUGHTONP) 70 of 75
I was going to try it, but I'm too dumb to make it work with Ralio.
From: Peter (BOUGHTONP) 2 Jun 2011 16:41
To: Ken (SHIELDSIT) 71 of 75
I've no idea if it'll run against Railo or not - wouldn't be surprised if Adobe had deliberately made it incompatible in some way. :/
From: Drew (X3N0PH0N) 3 Jun 2011 02:15
To: Peter (BOUGHTONP) 72 of 75