working with multiple dataset withing a table in SSRS

  • Hi,

    I have a main dataset which displays invoice details. I have another dataset which displays meter information for given invoice number. I want to display basic information from main dataset and meter information records (multiple records for given invoice number) from meter dataset within a tabale. How to achive this? any help is appreciated.

    Regards

    Jyothi

  • Really the best way to handle this is to return all the data you need in one dataset as it reduces round trips and makes working with the data in SSRS MUCH easier. That being said I have done this, but it has been awhile, so I may not get it all exactly right the first time.

    First you need to create your table with the invoice details dataset, do not use a details row, put everything in groups. Then within your innermost grouping place a table for the meter information records. I believe you will need to put a filter on the meter information table to link it to the parent table.

    If I have a chance later I will try to put together an example report using AdventureWorks so you can see what I mean.

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • Hi ,

    If it s neccessary to use two dataset,then Use the concept of Subreports

    Place a subreport in the table of ur First report

    Create another Report with the Invoice Details Dataset with Invoice No as ur Parameter (Inv Detail report)

    Link the Subreport in First report with the second report (Inv detail Report)

    Define Parameter as InvoiceNo in first report.

    But the problem with subreports in reporting services is that once u export to excel,Only the main table is exported. !!!

    :ermm:

  • This is why I do not spend much time on fourms. Gee, and I signed up for this. People with answers such as this,

    do not us the product and all the assests that make the product powerful.

    Multi datasets is one of the powerful tools in Reporting Services. The answer is in knowing the product, not 'don't do that'.

    Doctor docotr.

  • bsrlong (1/13/2009)


    This is why I do not spend much time on fourms. Gee, and I signed up for this. People with answers such as this,

    do not us the product and all the assests that make the product powerful.

    Multi datasets is one of the powerful tools in Reporting Services. The answer is in knowing the product, not 'don't do that'.

    Doctor docotr.

    Since you think the answers provided are incorrect or insufficient, and you seem to know more about it, why don't you post a solution instead of just complaining. The only way to improve forums is for experts like yourself to provide solutions to the questions.

    Please educate us all.

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • bsrlong (1/13/2009)


    This is why I do not spend much time on fourms. Gee, and I signed up for this. People with answers such as this,

    do not us the product and all the assests that make the product powerful.

    Multi datasets is one of the powerful tools in Reporting Services. The answer is in knowing the product, not 'don't do that'.

    Doctor docotr.

    I can see that you don't spend much time on forums. The knowledge that you would gain from doing so is quite visibly lacking.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • bsrlong (1/13/2009)


    Gee, and I signed up for this.

    I'm sorry you find this site a waste. Please feel free to ask Steve for a refund.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I get asked for refunds once a month.

    Happy to send you back what you sent to me! 😛

  • Sure, I will respond. Look at the quality at comments. what was that, "gee, you are so smart let's see you do better".

    Maybe you should try reading the comments people leave. The point is that you - all are not looking deep enough into solutions. Your solution to this question was, don't do that. Correct, or not. The person asked, how do I, and you responded with , don't. Like at work I try to point what you can do with products. This week someone was complaining Reporting Services can't handle Null data. Come to find out the problem was something they were doing in a stored procedure. Once they let someone look at what they were doing.

    First of all, I will tell as a fact, that using multiple data sets is not an drag on the product. I have one report that uses five different datasets, ties to five different tables and one of the data sets ties two different data bases. The report runs from 35 seconds to two. Not so bad. Multiple data sets is one of the great pluses of the product. Else I could just Crystal. (ouu). This report I worked on was intended for one individual at a time. Now of course the people wish to run the report against a group at a time. The tables do not all return the same amount of rows. So, I was looking for ideas to this. I do not have a solution yet, that is why I was looking at the forum.

    Before you get your feelings hurt, be a programmer man. Look for solutions. That is what I was doing. That is what I have done since the early 90's. COBOL, VB, dot, Hack away. Even when using SharePoint I have do some researching and hacking sometimes.

    Once again, the point being made, is if you say you can not do something, then give a technical reason. Maybe you are quite correct. Other wise, hack and search.

    Sorry to hurt your feeling, I was trying to make a point, forums can be useful, but put some effort into it.

    And yes, when I do find a solution, I will be glad to share it with you. So, excuse me while I go hack away.

    In the future I will not be abrupt. But sit and spend time searching, sing up for a site (for free) just to see an answer with a lack of substance. That was my point.

  • bsrlong,

    The point I was trying to make with my post replying to yours is that a forum is only as good as it contributors, and when you post a criticism of the contributors without offering a solution, you have actually reduced the usefulness of the site. I know I'm not an SSRS expert, but I use it and what I know I share. I love to learn and will freely acknowledge when someone provides a better solution and then use that in my work.

    Sure, I was being sarcastic, but, I was offended especially since you showed no interest in sharing a solution. If mine is wrong, or you have a better way, please share why don't just criticize.

    I offered an opinion that I believe a better design would be a single query and then provided a general answer on how to use 2 datasets even though I don't believe it's the best solution.

    I really hope you come back and offer a solution and, hopefully you'll come back when you have a question and will get an answer that meets your standards.

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • Thank you for taking the time to make your point. I will must was showing a lack of patience and frustration myself.

    As soon As I do find a solution I will not just post a reply I will attempt to have a document available.

    This is an interesting subject actually. People I find who have SSRS thrust on them lean on the near by for guidance have little patience for learning the product. Well, let me explain, I work in a shop where the M.S. guru fled, leaving me to defend and attempt to promote the products. Anyway, what I see are people who do not really learn the product first, time or not. I see at work one person using stored procedures and views, why, because someone else did before her. Now a SQL contract happens by for awhile. He is not an SSRS expert, so he throws out his preferences. I am sure you have seen the same. So we must strive to direct people toward the product itself.

    Granted this can be a bit difficult due to the lack of Reference books. In the COBOL/JCL/CICS world, in general I just needed good reference book for each. The same with DB2/SQL. Then again, I need not need to be the administrator, etc.

    In the M.S. world there are so many books, 'how tos', but not many like those few yellow, white and black Osborne Complete References. The one's for Crystal and SharePoint where very handy for me. Of course, they still do not contain everything.

    With SSRS one needs a guide that states, this is a Table, this how it works, this is a List, a Rectangle, a Matrix, etc. Instead we have how tos that display one use and do not often answer our question. So we search the the net for videos and M.S. how tos, that still come up short and do not give a Tech explanation.

    So, we hack away and we goggle - The forums. I have supported Heat by Frontrange. That is a help desk software. Some from the company used to go in to the forums and actually reply about - well, if you go to the registry,etc. Well, there go. Some one giving good detail. As an admin for the product I was not about to touch the Registry, but I can not complain the person was informative.

    You do mention a good point. Design. Only not for queries but the report itself. I inherited this report from someone and since the report was for one student at a time, that is how I designed the report. Some Textboxes and tables at the top showing contact info and Basic info (one dataset) A table with some enrolment info (DS two), a table with FCAT scores (DS3) a table with current classes (DS4) a table with history (DS5).

    That was all fine for one at a time. The parameter at the top is student ID and school year. Of course the history table can have no rows or many (That No Rows option is cool in properties. Just type some text for no rows).

    So this is a powerful ability of SSRS.

    Now, oh, I want all the ninth grade. oops. I did not design the report for that, did I. So I am wondering about throwing it all in a List or Rectangle but how do I reference the other datasets in the List since a list want to be associated with a data set ( I have not tried the rectangle yet), etc.

    If I do find a solution that works, I will let you know and I will attempt not to be cryptic.

    OK, good hacking.

  • bsrlong (1/13/2009)


    As soon As I do find a solution I will not just post a reply I will attempt to have a document available.

    I am certainly looking forward to that. When do you think you might be able to get to it? Might be good to follow up your detailed reply by submitting an article on the subject.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • bsrlong (1/13/2009)


    Thank you for taking the time to make your point. I will must was showing a lack of patience and frustration myself.

    ...

    OK, good hacking.

    I just wanted to say that your post reminds of the random text email spambots generate in order to get around spam filters. Most of it seems random and doesn't make much sense.

    You are aware that the original poster was asking about how to use multiple data sets in a table, right? Your follow-up posts seem to indicate that you think the question was how to use multiple data sets on a report. I think most people know how to do that.

    I am eagerly anticipating your solution for using multiple data sets in a table in a way unlike the suggestions made in this thread.

  • Jeff Moden (1/13/2009)


    bsrlong (1/13/2009)


    As soon As I do find a solution I will not just post a reply I will attempt to have a document available.

    I am certainly looking forward to that. When do you think you might be able to get to it? Might be good to follow up your detailed reply by submitting an article on the subject.

    {insert Jeapordy theme song here} 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (1/16/2009)


    Jeff Moden (1/13/2009)


    bsrlong (1/13/2009)


    As soon As I do find a solution I will not just post a reply I will attempt to have a document available.

    I am certainly looking forward to that. When do you think you might be able to get to it? Might be good to follow up your detailed reply by submitting an article on the subject.

    {insert Jeapordy theme song here} 😛

    You're bad.....:P

Viewing 15 posts - 1 through 15 (of 29 total)

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