1. Dale
  2. Valentina Reports ADK
  3. Mittwoch, Juni 10 2020, 03:26 PM
  4.  Abonnieren via E-Mail
Hello!

I have the following MySQL Schemas:
- Branch01
- Branch02
- Branch03

They have the same tables and corresponding structures. I have a report that calls a stored procedure that pulls the data for the report. I designed my report using Branch01. At runtime, the user may select Branch01 or Branch02 or Branch03, depending upon the given situation. However, my report still calls the data of Branch01.

How to work around this? I am using MySQL and Xojo.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hi Dale,

How do you generate a report?

Usually we specify the schema name in the datasource string passed to MakeNewReport:
project.MakeNewReport(
"report1",
"host = '127.0.0.1', port = 3306, user = 'sa', password = 'sa', dbname = 'Branch01'",
"SELECT *.....
Kommentar
There are no comments made yet.
Dale Akzeptierte Antwort
Hi Sergey,

Please see attachment for my report's datasource at design time. I am calling the right schema from Xojo but my select statement is a call to the stored proc. If I use the first branch (in this case "bw01";), everything is okay but if I use another, it only shows a blank report.
Anhänge
Kommentar
There are no comments made yet.
Dale Akzeptierte Antwort
Sergey, I got it now. Since my stored proc that is being called creates a temporary table, I included a "Select * from tempTable" at the end of the stored proc.

Sorry to bother. Cheers for your support!
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.