display on report

  • The stored procedure (sp) I run returns results as follows:

    Question:

    How do I present this on a report? Do I use a table or matrix?

    Thanks

    NULL2010Q2-2010Q3-2010Q4-20102011Q1-2011...

    Field13.65-1.222.31.3-5.364.140.24...

    Field22.672.282.251.94-2.323.43-0.78...

    Field33.6-1.52.221.22-5.433.920.16...

    Field30.98-3.50.04-0.64-3.030.711.02-...

  • Well, that depends on your requirements. Do you just want to display the information? Or do you want to have expandable groupings?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I would like to show exactly what the sp returns.

    Please note that the sp returns various columns depending on what is passed to it.

    For example: with parameter 1 it MAY return fields:

    NULL 2010 Q2-2010 Q3-2010 Q4-2010 2011 Q1-2011 Q2-2011 ...

    with parameter 2 it MAY return:

    NULL Q2-2010 Q4-2010 2011 Q1-2011 Q2-2011 ...

    Field1

    Field2

    Field3

    Field4

    Question:

    I would like the columns returned to be presented as fields.

    Note that the row headers i.e. field1, field2, field3, field4 are always the same.

    Stored procedure returns exactly (fields, row headers) what I want to show on the report. It's like I want to copy the result of the sp and paste it into the report but not sure how to do it?

    Any thoughts please?

    Thanks

  • I would just use a table then.

    Also, since the fields vary depending on parameter - you should consider either hiding fields depending on parameter value or using multiple reports to display the appropriate data for each parameter.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SP returns the data as follows:

    YearQuarter Field1 Field2 Field3 Field4 ...

    NULL 3.65 3.6 2.67 0.98 ...

    2010 -1.22 -1.5 2.28 -3.5 ...

    Q2 2010 2.3 2.22 2.25 0.04 ...

    Q3 2010 1.3 1.22 1.94 -0.64 ....

    Q4 2010 -5.36 -5.43 -2.32 -3.03 ...

    2011 4.14 3.92 3.43 0.71 ...

    Q1 2011 0.24 0.16 -0.78 1.02 ...

    Q2 2011 0.23 0.15 1.53 -1.3 ...

    Below is returned by SP2 (dataset produced by pivoting data) from the SP returned dataset above

    NULL 2010 Q2-2010 Q3-2010 Q4-2010 2011 Q1-2011 Q2-2011 ...

    Field1 3.65 -1.22 2.3 1.3 -5.36 4.14 0.24 0.23 ...

    Field2 2.67 2.28 2.25 1.94 -2.32 3.43 -0.78 1.53 ...

    Field3 3.6 -1.5 2.22 1.22 -5.43 3.92 0.16 0.15 ...

    Field3 0.98 -3.5 0.04 -0.64 -3.03 0.71 1.02 -1.3 ...

    Based on the above dataset. How do I place this on the report so that it shows as the dataset I sent initially?

    Thanks

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply