Skip to Content

Question about subreport connection to main report

Hi,

I am very new to this field. I have created three different reports (one main and 2 sub reports). I linked my sub report #1 to 'USERID'.

I do get results only if they have user id matches from main report and sub report. I want if there is no match, still I need results from sub reports. I am not sure how to go about it.

I tried stringvar ... my formula did work but did not get me results what I was looking for.

if anybody would guide me step by step, would be very appreciated.

Thanks

Mona

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Apr 04 at 04:50 PM

    You need to have some way - usually through an outer join - to get the user IDs of all students, regardless of whether they have overdue books. That is the only way you're going to get the fines subreport to run.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 04 at 03:37 PM

    If there is not a corresponding USERID in subreport then it will always be blank if that is your link.

    If you want a report for all user IDs in subreport then either link at a higher level eg Customer or Company. Or do not impose a link, and all data will be returned irrespective of data in Main report.

    If you are looking to achieve something else then you will need to describe problem in more detail.

    Ian

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Ian,

      The report I created goes like this. main report contains records of students who have either outstanding, lost, damage books listed. This come from a designated policy called location.

      second report, which is my sub report, I created for the fines they owe. meaning books returned, but fines not paid...this comes from another policy called BRSN

      I created a third sub report which also come from BRSN, but these charges are implied but not related to books, its called 'MISC'. The table I connected has item table, which has barcode no and MISC report does not contain barcodes, so it does not work along with BRSN sub report as a result I had to create another report.

      Now , all students who owe books may not have fines from previous returned books. When I linked my main report to sub report #1, I got result for those only who have outstanding book and also fines. It knocks out all other records which has just fines. Same case with sub report #2. I need all students from main report and sub reports if they have no match or one or more matches.

      I also tried to link with home room where every students have an assigned home room teacher. But my sub report attaches all home room students under one user ID. I do not know what I am doing wrong.

      Please help

      Thanks

  • Apr 04 at 04:05 PM

    Hello Ian,

    The report I created goes like this. main report contains records of students who have either outstanding, lost, damage books listed. This come from a designated policy called location.

    second report, which is my sub report, I created for the fines they owe. meaning books returned, but fines not paid...this comes from another policy called BRSN

    I created a third sub report which also come from BRSN, but these charges are implied but not related to books, its called 'MISC'. The table I connected has item table, which has barcode no and MISC report does not contain barcodes, so it does not work along with BRSN sub report as a result I had to create another report.

    Now , all students who owe books may not have fines from previous returned books. When I linked my main report to sub report #1, I got result for those only who have outstanding book and also fines. It knocks out all other records which has just fines. Same case with sub report #2. I need all students from main report and sub reports if they have no match or one or more matches.

    I also tried to link with home room where every students have an assigned home room teacher. But my sub report attaches all home room students under one user ID. I do not know what I am doing wrong.

    Please help

    Thanks

    Mona

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 10 at 06:41 PM

    Hello Christy,

    I tried to work around my report as you suggested. As I mentioned to you earlier, I have two subreports which I linked as userID. After receiving your suggestion, I created another dynamic report which carries all userID. This is now my main report.

    I linked all my subreport to "userID'. My all subreports are dynamic. Earlier I made my main report as overdue report, which now I am making as subreport placed right under detail section of my useriD as main report and other subreposrt one after another.

    My problem is I do get results from all three reports, but I do not understand how should I suppress all userid which are not a match from any of my subreports?

    If my main report has a school location selection as a parameter and when I connect my subreports, will they all be filtered by school location as well ? If yes, then I can easily remove my school location parameters from all my subrepost as all subreports have school location parameters. Is it correct?. If no, how can I by pass 'school selection parameter' from all subreports?

    Please advise.

    Thanks

    Mona

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Dell

      Thank you for your valuable suggestion and I took it religiously. I am happy to tell you finally I was able to finish my report the way I wanted. This was my biggest challeng but I made it very well.

      I have one small issue and I am sure you will have a brilliant solution to it.

      Here is my issue:

      I linked my three sub reports to my main report and it pulls all matching record and I suppressed all unmatched records. Now I sorted this list by home room teacher followed by user id.

      I want my report header and page header repeated on every page when home room changes. The idea is this report will be printed and given to home room teacher so they can give to their students.

      I went to group header and check off the last option which says print every page. I did and it does its job but I wanted report header and page header should be printed for every home room teacher not on every page.

      This is the only thing I am not able to do. I tried in section report and click every new page but I get lot of blank pages which I suppressed earlier. These are the ones which are unmatched records from sub reports to main report.

      Any great idea which helps me achieve my result?

      Please do let me know.

      Thanks

      Mona

  • Apr 11 at 03:43 PM

    ok. Great. But again is there any way I can suppress all unmatched record from main report if there is no match in any of three sub reports.

    Please help

    I do get results but lot of unmatch records I see in main report which I need to fix.

    If I use shared var ho can I put so all unmatched records in main report will be suppressed?

    Please help

    I am struggling so badly

    Thanks

    Mona

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Dell

      My supervisor wants this report made in pure crystal. SQL takes longer time to pull data and we get complains from teachers as they do not have patience.

      Is there any ways I can be able to suppress all student records who are not owing fines or overdue books .

      I get very nice results as you suggested to expand my search and really it worked . I see all matched records with sub reports but do not know how to suppress records of user id in mail report

      Thanks