Pulling more than one field into the same field within a report.

I posted this in the T-SQL forum, but it was suggested it may be better to post it here. This is somewhat complicated, so I hope I am explaining this well. I will post here what I posted there. I will also include two replies I gave in offering further information
in case that may help to further clarify my question. See below:
I am attempting to put together a report in Visual Studio 2008. It seemed a simple report at first, but as I am creating the SQL, I am having a little trouble conceptualizing how to get it to work exactly as needed. Here is the issue...
In this case, the report should show two rows for each department. One is the count of who within an audience (that will be set up as a parameter) completed a certain course (the course may also be a parameter). The next row should be a count, within that
same department, of all users within the audience. Both counts should be within the same field on the report, but on different rows.
My thought was to create two CTE's. One would contain the counts, by department, of everybody in the audience. The other would contain the counts, by department, of those within the audience who completed the given course.
The problem is, though, I need to then have these two counts by department on two separate lines, and they should be within the same field. Basically, the idea is they are the numerator and denominator. There would also be a field before the count that would
need to identify which one it is. For the sake of the example, call it "Measure_ID" and it would say "CourseCert" for the count of who completed the course and "CourseAvail" for the count of those who are part of the audience.
Let me know if that makes sense, or if I can provide any further clarification to help you better understand what I am trying to achieve. Does anybody have thoughts on how to do this?

Unfortunately, the counts need to be in separate rows. If they could be in the same row, it would have probably been a lot easier. I think I could have just done a couple "Case When" type formulas within the list of things under "Select."
As it is, I need the two counts to show up under the same heading in separate rows. Unfortunately, the table structure of this database is very complicated. I think it would likely just further confuse things if I tried to share all of that detail here.
That is why I was trying to be generic.
Unless there is another easier way I am missing, I was thinking the easiest way to achieve what I needed was to use two CTE's. One would list all users by department who belong to a specific audience (the audiences are what we use to then assign them to
certain courses, so the audience would be the people who are required to complete a certain course). The other would list all user by department who are in that audience and have completed a particular course. I think I am fine to complete that part. It is
just getting them to then display as in my example that I am not sure how to do.
The desired result, as you see in my example, has two lines per department, the first being a count of those who completed the course ("Certified"). The second line being a count of those who are required to complete it ("Available").
Does that help? I was basically hoping somebody had an example they could use, just with fake table names so I could adapt it to my data. If it helps, though, let's pretend the two CTE's are like this:
Table Name: Certified
Table's purpose: This table would list all people who had completed the course.
Fields:
CourseName
CourseCode
AudienceName
AudienceCode
CompletionResult
EmpCode
DepartmentCode
Table Name: Available
Table's purpose: This table would list all people who are assigned to the audience.
Fields:
AudienceName
AudienceCode
EmpCode
DepartmentCode
The desired result would then count the EmpCodes, by department, from each table in that Measure_Amount field so it could display as I showed above. Does that make sense? I apologize if that does not help to clarify. I was trying to be as simple as possible
so you could just use it as a generic example.

Similar Messages

  • Display more than one Graph in the same page along with report datails

    Hi,
    I have  to display 3 lines out put along with the 3 GRAPH’s  below corresponding to the 3 lines  in the same page of a the report output. .How do i achieve this?  The function modules like ‘GRAPG_2D’,   ‘GRAPG_3D’ brings the graph in separate pop up, but I want all the 3 graphs in the same page along with the some text above those graphs (ie my report details in 3 lines).
    Could you please let me know how to achieve this?
    Waiting fro your kind suggestions,
    Regards,
    Steve

    Hi,
    Refer to the following code to display graphs in report.
    DATA: BEGIN OF ITAB_DATA OCCURS 0,
    DATANAME(15),
    QUANTITY1 TYPE I,
    QUANTITY2 TYPE I,
    QUANTITY3 TYPE I,
    END OF ITAB_DATA,
    BEGIN OF ITAB_OPTIONS OCCURS 0,
    OPTION(20),
    END OF ITAB_OPTIONS.
    ITAB_DATA-DATANAME = 'Electricity'.
    ITAB_DATA-QUANTITY1 = 55.
    ITAB_DATA-QUANTITY2 = 62.
    ITAB_DATA-QUANTITY3 = 59.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Gas'.
    ITAB_DATA-QUANTITY1 = 35.
    ITAB_DATA-QUANTITY2 = 52.
    ITAB_DATA-QUANTITY3 = 44.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Water'.
    ITAB_DATA-QUANTITY1 = 18.
    ITAB_DATA-QUANTITY2 = 22.
    ITAB_DATA-QUANTITY3 = 19.
    APPEND ITAB_DATA.
    CALL FUNCTION 'GRAPH_MATRIX_3D'
    EXPORTING
    COL1 = 'Jan'
    COL2 = 'Feb'
    COL3 = 'Mar'
    TITL = 'Utility Expenses in US$.'
    TABLES
    DATA = ITAB_DATA
    OPTS = ITAB_OPTIONS
    EXCEPTIONS
    OTHERS = 1.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • Insert more than one contact in the same page/document

    Hello,
    I have tried without success to insert more than one contact into the same page of a document.
    For example, if i insert 2 Address book fields in a page, when i drag a contact from the address book then it populates automatically the 2 fields, and it is impossible to separate these fields and to populate them with 2 different entries (on the same page).
    And when you drag more than one contact to Pages, it asks you if you want to create one document per contact.
    Would it be possible to just insert 2 or more different contacts on the same page/document ?
    Thanks in advance for any help,
    Fred.

    Unfortunately, this can't be done with Pages, nor could it be done with AppleWorks. I think the assumption is that you would merge into a letter & one letter sent per person. In checking the 3 postcard templates in Pages 3, none of them have address book fields to drop contacts into.
    There is a workaround, but it might not be worth the effort. Create your postcard as a single, large document in page layout in landscape & merge to a new document. Then, in the print dialog, choose Layout from the drop-down menu that says Copies & Pages & choose 4 from the Pages per Sheet menu. You might also want to add a hairline border for cut lines.

  • More than one library (on the same computer) open?

    In the new iTunes 9 it is possible to access several libraries on my home network from the open iTunes window, which is really cool. I wondered if this means it may now be possible to have access to several libraries on the same computer (or connected drives) at the same time. I use 3 different libraries on my work PC and my mac at home and the process of shutting down iTunes, holding down shift/option, reopening itunes, selecting library is rather cumbersome. Having each of the libraries accessible the same way they are for other libraries on the network would be really useful.
    Is it possible?

    pajagsfan wrote:
    Can I create more than one library on the same computer?  Just got an ipod for my wife but didn't want her to have to use my library to sync to, so I thought I created another library for her.  When I deleted my albums from her library the disappeared from mine. (I think?)
    I know it's Valentine's Day, but before you get your wife fixed up the first thing you need to do is recover the deleted albums for your own library.  See if the files are elsewhere on your hard drive, or in the Recycle Bin.  When you find them, get them back into your own library.  Now you are ready to help your wife.
    As noted above, you can have two libraries in one Windows user account via the Shift-Start approach, but if you both use your libraries regularly, that becomes annoying quickly.  It is better to set her up with her own Windows user account. She can have her own iTunes library there.
    Get a copy of your entire iTunes folder to start her off.  She can delete stuff she doesn't want without messing you up.

  • Can i create more than one library on the same computer?

    Can I create more than one library on the same computer?  Just got an ipod for my wife but didn't want her to have to use my library to sync to, so I thought I created another library for her.  When I deleted my albums from her library the disappeared from mine. (I think?)

    pajagsfan wrote:
    Can I create more than one library on the same computer?  Just got an ipod for my wife but didn't want her to have to use my library to sync to, so I thought I created another library for her.  When I deleted my albums from her library the disappeared from mine. (I think?)
    I know it's Valentine's Day, but before you get your wife fixed up the first thing you need to do is recover the deleted albums for your own library.  See if the files are elsewhere on your hard drive, or in the Recycle Bin.  When you find them, get them back into your own library.  Now you are ready to help your wife.
    As noted above, you can have two libraries in one Windows user account via the Shift-Start approach, but if you both use your libraries regularly, that becomes annoying quickly.  It is better to set her up with her own Windows user account. She can have her own iTunes library there.
    Get a copy of your entire iTunes folder to start her off.  She can delete stuff she doesn't want without messing you up.

  • Drill down more than one characteristic at the same time.

    Hi,
    Is there any way to drill down more than one characteristic at the same time?
    When I drill down by 0cust_sales I would like to have drilled down: division/distrchan/salesorg/cust_sales without having to do that one by one.
    thank you!

    Hi,
    This cannot be done unless these characterstics are related to each other in some way as Charactertics & Display Attributes.
    The reason being when you drill down the 0cust_sales , there is no link from 0Cust_sales to the other characterstics hence there is no prompt for these characterstics to be drilled down.
    However, a smiliar thing might be acheived by adding these chareacterstics into the 0cust_sales in teh query designer by dragging n dropping them over 0cust_sales. you can try this and see if this is close to your requiremetn.
    Kind Regards,
    Tapish

  • HT1657 Can you rent more than one movie at the same time?

    Can you rent more than one movie at the same time on itunes?

    I think Justin is correct and you should have statistics in place and a reasonable partition scheme so that the optimizer selects the correct partitions rather than telling it what to do. You paid a lot for partitioning after all.
    There are some, possibly misguided, examples in the manuals showing how to create a view so you can delete from a single partition without specifying the partition criteria in the delete statement. This in effect turns partitioning back into DIY partitioning i.e. separate tables, union all and pretend its a single logical table using a view. But backwards.
    So to do what you want you just assume the partitions are separate tables, and then use union all to glue the ones you want back together.
    select * from sales partition (sales_q1_2000)
    union all
    select * from sales partition (sales_q1_2001)
    union all
    select * from sales partition (sales_q1_2003)
    union all
    select * from sales partition (sales_q1_2004);It probably goes without saying that as well as making the expensive version of partitioning behave like the free alternative, there is the possibility that it will perform like it as well.

  • Is there a way to put an item under more than one calendar at the same time?

    I use the calendar to keep track of not only my schedule, but my entire family's. For years I had a calendar labeled 'kids.' Now as they're getting older it would be easier to have an individual calendar for each child. Easier for me to track where they are and they could have they're own calendar on their iphone or iphone touch since we all share one cloud account. However, frequently more than one is at the same activity. The calendar program will only allow me to select one calendar to place an event under; as soon as I select another, it deselects the first. Is there a way to place an event under more than one calendar?
    (Since I'm still the one driving that needs to know date, time, place, etc type details I don't want them adding it to their own schedule - maybe -  on their devides and synching through cloud)

    You can create many calendars. Here's the tip:
    Example: you have 1 son and 1 daughter.
    In iCloud ( https://www.icloud.com )
    Create 1 calendar called Son ( Choose a color to tell them apart )
    Create 1 calendar called Daughter ( Ditto )
    Create 1 calendar called Kids
    Since you are the creator, you get to see all calendars combined.
    Send invitations to each of them
    Son gets Son and Kids calendars
    Daughter gets Daughter and Kids calendars
    So if there an event for Son, just put in that calendar
    If it's for both then enter it in the Kids calendar
    Likewise for daughter.

  • Can I sync more than one iPhone to the same computer?

    Can I sync more than one iPhone to the same computer?
    I have one MacBook pro, already have my iPhone synced to it. I want to sync my wife's to it as well so she can share my iTunes library.
    Is this possible?

    Create a new user login (with a password) for your stuff.
    This way, your data won't get mixed up.

  • Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes? Both my daughters have ipods, my wife has one

    Dear All
    Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes. My daughters have a different generation 'nano' each & my wife a 'shuffle'?
    Many thanks

    Click here for options.
    (69081)

  • I have more than one copy of the same song in my iTunes. Some have the icloud symbol next to them and some do not. I need to clean this up but I am afraid to delete the songs for fear I will lose them.

    I have more than one copy of the same song in my iTunes. Some have the icloud symbol next to them and some do not. I need to clean this up but I am afraid to delete the songs for fear I will lose them. Please help! On top of that my Mac keeps telling me my start up disc is full and I am deleting stuff like crazy!

    Welcome to the  Discussion Forums
    It won't be a problem if you delete your extra copies.
    I don't download very much to my tv, I do sometimes if I'm in bed but usually I do it from itunes. However if you have not fully downloaded something to the tv it is possible to start the download from itunes as well, you have likely activated 'check for downloads fin itunes in some way, could be by opening itunes, selecting 'check or downloads' from the advanced menu or that you simply have automatically check for downloads set in your prefs and it has checked coincidentally.

  • HT1719 Can more than one device access the same ITunes library?

    Can more than one device acess the same ITunes library?  And if so, does each device's list of songs remain separate and distinct for each device?

    No problems whatsoever. I have 3 iPhones and 3 iPod touches with different IOS connected.

  • How do I view more than one image at the same time in CS6?

    How do I view more than one image at the same time in CS6?

    Hi there
    If you go to Window > Arrange you can choose from several view options. Below I have selected Two-Up Horizontal since I have two images, but you can select other options if you have more than one image.

  • URGENT: passing more than one value at the same parameter

    Hello friends at www.oracle.com,
    if I have a Forms program that sends some parameters to a Report, how can I send more than one value at the same parameter that is being sent?
    For example: the Reports parameter P_CODE should receive (from Forms) and print the values 1, 2, 3 and 4, each one in a different page. But, only 4 is being printed, and these values aren't saved at a database, so I have to pass the other three values too. How can I solve this problem?
    This is quite urgent and I need help on this.
    Best regards,
    Franklin Gongalves Jr.
    [email protected]

    Thanks to Oracle Reports Team for answering! I'm sure this will work.
    Best regards,
    Franklin Gongalves Jr.
    [email protected]
    hello,
    on the forms side, you will have to build the list for this parameter by e.g. string concat.
    on the reports side you will have to "decode" this parameter according to how you built it in forms.
    e.g. if you pass the list like this "10~20~30" you might use a where-clause in the query
    ... where instr(myCol, :myParam) >0
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

  • Jquery accordion where we can open more than one region at the same time

    Hi,
    I am trying to create a jquery accordion where we can open more than one region at the same time. I saw a post
    from patrick to do accordion where we can select only one region at a time.I am using Apex 4.0
    Using jQueryUI Accordion with APEX 4.0
    Any input on this will be appreciated.
    Thanks,
    Nav

    Hi,
    As I understand jQuery UI accordion do not have feature you looking for
    Regards,
    Jari
    Edited by: jarola on Sep 7, 2010 12:29 PM
    See documentation from here
    http://jqueryui.com/demos/accordion/#default

  • Add Suppporting Details for more than one periods at the same time for the same Account in Planning.

    As we know, in planning form, we can add supporting details to one cell for the level 0 members intersections.
    But can we do that as below:
    add supporting details for more than one cells at the same time?
    I tried to do that in workspace and smartview, neither is working.(my workspace version 11.1.2.2.300.20)
    I wonder if i am not with the right version, because i don't know how to get the below.
    Can any one explain?
    Thank you.

    Hi,
    I have tried in Smartview for a simple form where my period dimension was in columns and accounts in rows.
    You need to select multiple period and select supporting details, it will show those selected period for which you can add the supporting details.
    You can add these details and then submit the data in the form.
    Regards,
    Sourabh

Maybe you are looking for

  • How can I add all of my PDF files at once

    Is there any way to add all of my PDF files that are in different folder at once, kind of self search option that add the files automatically, thanks.

  • Yosemite upgrade causing issues with Adobe Premiere Elements 10

    Hi, Over the last weekend I upgraded my mid-2010 iMac to Yosemite from Snow Leopard and it seems to have caused an error with Adobe Premiere Elements 10. Prior to upgrading I was working on a project without issue. Now, when I try to open it I get an

  • CD cover not displaying in Album List view

    A couple of my CDs cover art doesn't display in Album List view (second button from left of the 4). However the art is definitely there. If I click any song in the CD, the art shows in the lower left, "Now Playing" Or if I select a song and then CMD

  • Columns in Admin Tool are re-ordering

    Not sure what is causing this but it might be related to my Logical dimension-fact table relationships. I will order columns in the Presentation layer or the BI Administrator Tool within folders and randomly the columns will re-organize and be sorted

  • Modify the messages in error page.jsp

    Hi All, I am using error page for exception handling and using the statement LOG.error("dpm Exception", exception); But due to this my performance of the program is getting degraded. For example if the user is not authenticated to view a particular p