Showing posts with label guys. Show all posts
Showing posts with label guys. Show all posts

Wednesday, March 7, 2012

Reporting Server Rendering

Hi Everyone,

Let me first tell u guys/gals what i hve done till now. I've created a Report Server and created a TestReport.rdl file in it. This report is bound to a DataSet. Now i want to ask few qusetions:

First, Is it possible to call this report from another Project (Web) so that it could be rendered directly to ReportViewer without having to specify a DataSource ? I mean, i wouldn't have to specify the ReportDataSource again since it's already specified when i created that report.

Second, can the same functionality be specified for .rdlc (client file) ?

Till now i've worked out this code:

<code>

rptView.ProcessingMode =ProcessingMode.Remote;

rptView.ServerReport.ReportServerUrl =newUri("http://localhost/Tutorial/");

rptView.ServerReport.ReportPath ="Report2";

</code>

but this doesn't seem to work and keeps on giving me this error:

The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.The request failed with HTTP status 404: Not Found.

Any points in the right direction will be greatly appreciated. TIA

ok i figured out part of the problem, it was happening because Report Server wasn't configured properly. But now it says "Report requires an Active Database Connection" but when i try to configure the database through Reporting Service Manager i get the error:

Using Other editions of SQL Server for report Data Source and/or the reprot Server Database is not supported.

not sure wat that means but i'm lookng into it.

Any help will b appreciated. TIA

Saturday, February 25, 2012

Reporting on delimited fields.... best practice? suggestions?

Hi guys... I need to do some statistical reporting on the answers to registration questions. The answers are stored in pipe-delimited varchar fields to allow for one-or-many answers to a single question... here's an example:

Q: What are your fav colors?
A: [checkbox list of colors]

Now the data is stored like this:

Reg001
----
red|blue|green|yellow

Now I need to determine how many people selected each individual answer, so like, how many people picked red, how many people picked yellow... to report like this:

Red - 12
Blue - 23
Green - 15
Yellow - 9

What is the best, or suggested way, to go about splitting this data up and reporting on it? Can it be done in T-SQL, or will it need to be a combination of T-SQL and .Net language?

Thanks!

-e::The answers are stored in pipe-delimited varchar fields to allow for one-or-many answers
::to a single question...

First step: shoot the person who designed the database. If he survives, get him get a boko about sql databases for beginners.

Ok, now:

* Any normal SQL is just off. Sadly. You need to preprocess this field before accumulating the values.
* This is string manipulation. T-SQL is not particularly nice in this.

Is the number of possible answers known? I mean, the list which is stored is defined, right?

If this is the case:
* one statement can work. Accumulate (count) or whatever over a computed column comparing for a defined value.

Basically the function in the field definition can check whether the string field is like - for example - '%red%, hitting on all lines containing red. You need to run one query per color then you get the data.

Main problem: makes my toes come up - this is terribly inefficient from any SQL Lover's point of view. But I fear there simply is no other way to process this. From a relational point of view this way of storing multiple choices is a horrible aberration, and as a result SQL is not really efficient in handling it.

For using a .NET language you have (right now - before yukon) to transport all the strings to the client. Not sure this is more efficient - the bandwith requirement can simply kill it off. Processing is earsier, though - just run coutners against color values stored in a hashtable (with the current count as value).