Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Documentation

2007-04-06
2013-04-08
  • eugenedakin
    eugenedakin
    2007-04-06

    Hello,

    I am new to database reporting and was trying to use your database to create a report from a Microsoft Access 2003 database.

    Do you have some beginning instructions or documentation, so that I can query the database and build a test report in Windows XP?

    Thanks for your help.

    Cheers,

    Eugene

     
    • Norbert Szabo
      Norbert Szabo
      2007-04-09

      Hello Eugene!

      For creating report file try/look sample reports. The samples also can be opened by designer. You may replace mysql settings to odbc.
      Using API, you should do something like this:

      databasepath = "db.mdb";
      m_database = QSqlDatabase::addDatabase("QODBC", "1");
      m_database.setDatabaseName("DRIVER={Microsoft Access Driver\(*.mdb)};FIL={MS Access};\ DBQ=" + databasepath);
      m_database.setUserName("admin");
      m_database.setPassword("password");
      ...     

      From test form:

      Database driver: QODBC
      Default database: DRIVER={Microsoft Access Driver\(*.mdb)};FIL={MS Access};\ DBQ=C:\data.mdb
      Username: ...
      Password: ...

      Until detailed documentation hopefully samples may help you to understand the simple structure of report definition file and API usage. (ncreporttestform.cpp)

      regs
      norbert

      --
      Norbert Szabo
      Helta Kft.
      nszabo@helta.hu