crosstab

How can I create a tabular report in SQL when the column names are in the database, not the query?

http://www.geocities.com/colinpriley/sql/sqlitepg09.htm has a nice technique for creating a tabular report where the column names for the table can be coded in the query but in my case, the columns should be values from the database. Say I have daily sales figures like: Transaction Date Rep Product Amount 1 July 1 ...

Cross tab query with boolean fields as row headers.

I currently have a table structure that looks something like this(some details omitted): ColumnName || Type Date_Of_Job DateTime Reparied_Service Boolean Disconnect_Service Boolean Relayed_Service Boolean Reparied_Stopcock Boolean Replaced_Stopcock Boolean TPFNR_Repaired ...

3-way CROSSTABS in SPSS

I have some data in SPSS that I would like to format in a particular way, but I can't seem to find a way to do it in the documentation. I have data that consists of 10 question responses, Q1 to Q10, with a Q1 to Q10 for each value of a variable SPEAKER within a variable SESSION. For example, each session can have up to five speakers, f...

Conversion from Perl to Java

I want to convert the code by Giuseppe Maxia for DBIx::SQLCrosstab to Java. I have done the bulk of the conversion, however I am stuck at these in the code listed below in DBIx::SQLCrosstab::Format. Some pointers on the listed code will be helpful. # find initial columns without sublevels my @header_columns =(); #@header_columns = map ...

crosstab issue in iReport

Hi , Can anyone please tell me how to group crosstabs w.r.t report level group in jasper report. i.e. in my problem i am using three crosstabs in details band.....and i want this page to be grouped by coutryname. eg.if country=Australia print three crosstabs and if country changes to india print three crosstab on the next page can an...

Is there any way to print all pages of a Cross Tab Crystal Report through the .NET Crystal API?

We are printing our Crystal Reports via the Crystal .NET API PrintToPrinter method. Recently it was discovered that when printing Cross Tab reports (reports that span multiple pages horizontally), only the first page is printed and the other "virtual" pages are not. We can preview the Reports fine in the .NET Crystal Report Viewer contro...

Need to display page header and footer

I need to display page header and footer in all the pages. Currently I am not getting in my second page because I am using cross Tab in summary band. Please help me out in resolving this issue. ...

Cross-tab Query

Hello, I have a table with employee attendance - lets say - OATT. Following is the structure and sample data AttDate EmpId EmpName AttCode InTime OutTime 01-10-2009 1 Jain, Rahul P 0900 1830 02-10-2009 1 Jain, Rahul P 0900 1830 03-10-2009 1 Jain, Rahul P 0900 1830 04-10-2009 1 Jain, Rahul P 0900 1830 05-10-2009 1 Jain, Rahul P 0900 18...

SQLite Pivot and Cross Tab Queries

Hi, Is there any way to create a pivot and/or cross-tab query using for SQLite using any of the available .NET wrappers? Thanks. ...

How do I center a crosstab in Crystal Reports XI?

I have a crosstab that I would like to have automatically centered (left to right) on the page. I would have thought this a simple thing. For example, on a web page I could do something like "align=center". In a java GUI I would use a layout manager. In GWT I would use a panel. In Word I would use Ctrl-E. In Latex, \centering. ...

Jasper Reports crosstab sorting with comparatorExpression

I'm trying to sort my dynamic columns in a cross tab according to some custom scheme. In the docs I found mention of comparatorExpression: Crosstab group bucket comparator expression. The result of this expression is used to sort the buckets, in ascending or descending order. If no comparator expression is specified, the natural order...

horizontal to vertical table transformation in SQL Server 2005

I have a page that dynamically builds forms input fields from a table allowing users to enter input into the form. Each input is a field in a _info table. I would like report showing all of the entries of a user in one line. Each field entry is a row. So I need to take the vertical data and make it horizonal. There are many different fo...

Linq: How to transform rows to columns with a count (Crosstab data)?

I think I need a way to perform a pivot or crosstab using C# and Linq with an indeterminate number of columns. However, I will add some beginning detail to see where it goes. < Beginning detail > Imagine a table that has two fields: string EventName; Datetime WhenItHappend; We want to generate a report like the example below where ...

Crystal Reports: How do I repeat a constant number of rows / headers on each new page in a cross-tab?

I have some data that I've staged in my database as such: RowHeader ColumnHeader Value Row1 Col1 (1,1) Row1 Col2 (1,2) Row1 Col3 (1,3) Row1 Col4 (1,4) Row1 Col5 (1,5) Row2 Col1 (2,1) Row2 Col2 (2,2) ...

How do I do a Crosstab in Vertica

What is the Vertica equivalent of crosstab or pivot table found in PostgreSQL and other RDBMS's? ...

Crystal Reports XI Cross tab summarised field how to stop cell rows of the same value merging?

I have created a cross tab however if I have a firstname field it merges the rows together if there are two names which are the same. How do you get it to display the names in the each row. In the example below Sarah is not displayed twice as the cells are merged together. Firstname Lastname Judy Collins Sarah Dane Smith Joe D...

Cross tabulation using C#

Hi All, I need to create a cross tab using datatable in C#. Something like this fucntionname(Array datarows,Array datacolumns) The function should return the cross tabed table, more parameters for missing values would be great The source datatable can have multiple columns ranging from 1 - N. following are the tables http://spreads...

t-sql most efficient row to column? crosstab for xml path, pivot

I am looking for the most performant way to turn rows into columns. I have a requirement to output the contents of the db (not actual schema below, but concept is similar) in both fixed width and delimited formats. The below FOR XML PATH query gives me the result I want, but when dealing with anything other than small amounts of data, ...

MS Access CrossTab query - across 3 tables

Hi, I have the following 3 tables: 1) Sweetness Table FruitIndex CountryIndex Sweetness 1 1 10 1 2 20 1 3 400 2 1 50 2 2 123 2 3 1 3...

Dynamically create categories for SQLite pivot/crosstab

I realise it is possible to create a crosstab within sqlite, but is it possible to dynamically determine the relevant categories/columns at runtime rather than hardcoding them? Given the following example, it can get rather tedious ... SELECT shop_id, sum(CASE WHEN product = 'Fiesta' THEN units END) as Fiesta, sum(CASE WHEN product = ...