Subreports Question

  • Hello forums, I am very new to reporting services, and i am under presure to learn it quickly.

    I need help understanding subreports, or maybe not, I dont kow. My situation my require them, ill let you decide.

    I have a jobs database, each job can have many job item, and each item can have many parts assigned to them.

    A customer may have many jobs

    So the structure is like this:

    Customer -< Jobs -< Job Items -< Parts I need to product a drill down report for a customer and there jobs, Items and parts. How on earth do I do this? I can get a customer and there jobs, but not anything further thanks for your help Mark

  • I think you need to create a report "Job Items Report" that will receive as a parameter the JobID, and will show all the Job items. Then, put this report as a subreport (drag the subreport from the toolbox into a table row) and set the subreport parameter to @JobID. There might be some more details, but thats the general idea.

     

    Hope this helps,

     

     

  • Cheers man, ill try that tomorrow at work and let you know how that goes

  • ok so im a little confused...

    I have now created 2 reports. One contains the customer as the heading of the body of the report and it contains all jobs for that customer. But I should note that jobs a grouped into a drill down of job status' (incomplete, waiting, etc...).

    The second report is a completly seperate report of a job id as the header of the body, and it contains the job items for each job, AND the parts used for each job item.

    Now I need to combine these 2 reports to be one. What I would like is to have the customer, and basically have all the jobs, which can drill down into all of the job items which will just show all (if any) parts associated with the job items.

    When i drag the subreport onto the table row in the first report, i get the error : error sub report canot be shown

    any ideas? I dont really know how the parameters work, but i did pass in the job_id like you said

  • Ok i got it, sort of...

    What I did was I didnt even use a subreport, but i used groups of the table element and added more groups as needed. Not sure just how this is working yet, but it is so im happy.

    New question!

    I have the drill down thing working for all needed elements, but some elements dont have anything extra to show when the use clicks the drill down button, is there a way to hide the little [+] button if there is no data under the particular heading?

    Im assuming it has to be done with some expression, but i dont know how to reference the hidden field attributes and so forth if there is no data in the sub feilds...

    hope this makes sense, ill keep you up to date if i find anything

    Cheers!

    Mark

  • I'm happy you got it working. Don't know about the hiding thing... Good luck!

  • yeah, thats going to be a tricky one. If anyone knows how to do this please give me a clue or even some remote thought about it. I really need it done

  • for those of you interested, I got it.

    To hide a row that has no values, simply put an expression into the row that you want to hide which will result in a true of false statement...

    like so:

    =IIF(Fields!job_description.Value "", false, true)

    so if the field, job_description is blank, the row will not show up

  • You mean that's the expression I sould put in: Properties->visibility->initial visiblilty->expression?

     

    Anyway, way to go!

    Thanks

  • yes that is what I meant, thanks

Viewing 10 posts - 1 through 9 (of 9 total)

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