Results 1 to 3 of 3

Thread: Specify Database Location of subreport

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2008
    Posts
    6

    Specify Database Location of subreport

    Hello,
    I have a report with a sub-report but when specifying the location for the subreport it fails saying table doesn't exist. When I remove subreport it works fine. Both main and subreport use the same table, here the code...

    Set Report = New CRProgMaqImp4
    Report.Database.Tables(1).Location = "wcajtot" & RsUsu.Fields("Usuario")
    Set crSubReport = Report.OpenSubreport("Tarimas")
    crSubReport.Database.Tables(1).Location = "wcajtot" & RsUsu.Fields("Usuario")

    Thanks.

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Specify Database Location of subreport

    Try :
    Code:
    Set crSubReport = Report.OpenSubreport("Tarimas")
    For K = 1 to crSubReport.Database.Tables.Count
        crSubReport.Database.Tables(K).Location = "wcajtot" & RsUsu.Fields("Usuario")
    Next K

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2008
    Posts
    6

    Re: Specify Database Location of subreport

    Thanks jggtz, it didn't worked using this way, I solved problem using other way...

    on the subreport i was using "INNER JOINS" between tables, what i did was added additional fields on the master table to prevent the use of JOINS, it worked fine with the same code.


    Many thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width