Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: data connection  (Read 439 times)

ghon

  • Newbie
  • *
  • Posts: 23
    • View Profile
data connection
« on: August 03, 2023, 12:09:25 AM »
How can I change connection as
Driver
Server
Port
User Name
Password
at runtime from qt application.
Thank u in advance.

Subst

  • Sr. Member
  • ****
  • Posts: 444
    • View Profile
Re: data connection
« Reply #1 on: August 03, 2023, 10:22:48 AM »
In such case U need to open database in your application, create model for needed table and transfer it to dataSource
like this

Code: [Select]
LimeReport::ReportEngine *report=new LimeReport::ReportEngine(this);
report->dataManager()->addModel(...)

may be exists another way to solve the problem, I can't to come quickly.
Lets wait for Alex?
« Last Edit: August 03, 2023, 10:42:08 AM by Subst »

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 992
    • View Profile
Re: data connection
« Reply #2 on: August 05, 2023, 11:40:19 AM »

ghon

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: data connection
« Reply #3 on: August 22, 2023, 10:12:43 PM »
I'm Using postgres I need to change the connection(server,password,port,database) at runtime