DataReport with Two Tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smartchap
    New Member
    • Dec 2007
    • 236

    #16
    Thanks Mr. Dhillon
    I will try it and will tell you about outcome.

    Comment

    • smartchap
      New Member
      • Dec 2007
      • 236

      #17
      Hi
      As soon as F5 is pressed I get error 'Invalid Data Source' and can not debug the program because even if I use F8 soon I get the error without displaying the line of error.

      Comment

      • 9815402440
        New Member
        • Oct 2007
        • 180

        #18
        hi smartchap
        for this use following code to open connection
        with cnn
        .Provider = "MsDataShap e"
        .Properties("Da ta Provider") = "Microsoft.Jet. OLEDB.4.0"
        .Properties("Da ta Source") = DataBasePath
        .Open
        end with
        regards
        manpreet singh dhillon hoshiarpur

        Comment

        • smartchap
          New Member
          • Dec 2007
          • 236

          #19
          Already used the similar (or should say same) code, with different variables, but error. Only after that I asked u why that error. Ok, tomorrow I will again see what is wrong with my project.

          Comment

          • smartchap
            New Member
            • Dec 2007
            • 236

            #20
            Dear Mr. Dhillon
            Please see the attached files and help exact problem. As the error occurs even before the form is displayed, it means there is some error with datareport, but I could not find it.
            Someone please help.
            Attached Files

            Comment

            • 9815402440
              New Member
              • Oct 2007
              • 180

              #21
              hi smartchap
              from the structure of the database if could not understand what data you want to retreive. to illustrate the logic i have combined tables and shown in report.

              message 'invalid data source' appeared because you called rptTest on startup

              i am attaching the modified project.
              do not forget to change extention to .rar

              regards
              manpreet singh dhillon hoshiarpur
              Attached Files

              Comment

              • smartchap
                New Member
                • Dec 2007
                • 236

                #22
                Thanks Mr. Dhillon for quick and accurate help.
                Actually I am very poor in SQL & DataReports. In last few days I have learnt a lot about DataReports and something about SQL. Before seeing reply from u, I changed SQL query a lot (with the helps got on net), but could not understand why report is opening before loading the form. Actually I didn't set it as startup, what I did was that I opened the report by u by double clicking, then added a form and pasted (& written) code in that. Due to this rptTest was set as startup which I could never imagine. Thanks for telling me the problem.
                One more thing, will u please explain a little about sql query u wrote. Specially what is the use of SELECT 'Table 1' AS strTableID and similarly for Table 2.
                Now I will try to modify the code as per my requirement and will let u know.

                Thanks once again.
                Hope zooming problem is solved as reqd by you.

                Comment

                • smartchap
                  New Member
                  • Dec 2007
                  • 236

                  #23
                  Use of strTableID is clear. My first table contains 4 fields, second 6 fields & third 7 fields (excluding IDs). How to show them in report with / without line borders around each field. Borders are required for only 4 fields for table1 output, for table2 around only 6 fields and around all 7 fields for table3. Please help me how to achieve this.

                  Comment

                  • narendersingh
                    New Member
                    • Nov 2013
                    • 2

                    #24
                    hi smart chap. I think dhillon has solved ur query.

                    Comment

                    Working...