xsharp.eu • ReportPro 3.9 and sql table swap - Page 2
Page 2 of 4

ReportPro 3.9 and sql table swap

Posted: Fri Mar 18, 2022 1:28 pm
by gjbiagiotti
Jamal.
The connection to the Report is fixed:
SELF:oReport:SetConnection(CONNECTION_ODBC, oGvar:cDriverSQL, LONG(pSqlRet), LONG(pSqlRet))

But the problem in the report that does not execute the substitution of tables, continues.

Gerard

ReportPro 3.9 and sql table swap

Posted: Fri Mar 18, 2022 4:42 pm
by robert
Gerard,
Can you prepare a small stand alone example that demonstrates this ?

Robert

ReportPro 3.9 and sql table swap

Posted: Fri Mar 18, 2022 8:22 pm
by gjbiagiotti
Hello, Robert
I pass a complete code example that works and generates the problem that I have already commented on.
This report uses 2 SQL tables in design mode and one of those tables has a different name in execution mode.It is a table of tax withholding codes that is linked to a second table of accounts in the company's accounting.In the attached image, the description of each ledger account should appear in the column on the right that is blank.
Attached image and method.

Gerard

ReportPro 3.9 and sql table swap

Posted: Fri Mar 18, 2022 9:07 pm
by gjbiagiotti
Robert
Yesterday I downloaded version 2.10c of X#, and in Windows 11 it doesn't run directly.

Gerard

ReportPro 3.9 and sql table swap

Posted: Fri Mar 18, 2022 10:41 pm
by gjbiagiotti
Hello
Another problem I found with the report is that in the following command:
oReport:SetTableStringAttribute( 1, "DSN", SQLQUERY_ATTR_SQL_ORDERBY, "table.order")

If you refer to the table name it throws an error, if you just use the field name it works fine.

Error:
oReport:SetTableStringAttribute( 1, "DSN", SQLQUERY_ATTR_SQL_ORDERBY, "customer.code")

No error:
oReport:SetTableStringAttribute( 1, "DSN", SQLQUERY_ATTR_SQL_ORDERBY, "code")

ReportPro 3.9 and sql table swap

Posted: Sat Mar 19, 2022 6:52 am
by robert
Gerard,
gjbiagiotti wrote:Robert
Yesterday I downloaded version 2.10c of X#, and in Windows 11 it doesn't run directly.
What do you mean with "doesn't run directly"?
- the installer does not run (did you unblock the file, windows blocks the file when downloaded from the internet)
- the VS integration does not work
- the compiler does not work.
- something else does not work

Come on, as a programmer you should know that you need to be more specific than "does not run".
My development machine is Windows 11. That can't be the problem.

Robert

ReportPro 3.9 and sql table swap

Posted: Sat Mar 19, 2022 6:57 am
by robert
Gerard,
gjbiagiotti wrote:Hello, Robert
I pass a complete code example that works and generates the problem that I have already commented on.
This report uses 2 SQL tables in design mode and one of those tables has a different name in execution mode.It is a table of tax withholding codes that is linked to a second table of accounts in the company's accounting.In the attached image, the description of each ledger account should appear in the column on the right that is blank.
Attached image and method.
This is not what I call a "complete example"
- The code is part of a class that you did not include
-and the sql data is not included.

Please look at our issues list on Github for many examples of how you should report an issue.
For example:
https://github.com/X-Sharp/XSharpPublic/issues/997
or
https://github.com/X-Sharp/XSharpPublic/issues/995


Robert

ReportPro 3.9 and sql table swap

Posted: Sat Mar 19, 2022 12:43 pm
by gjbiagiotti
Robert
As you have said, the executable was blocked.
Detail that I did not take into account since with version 2.8 I did not have that problem.
But it was my mistake anyway.
Thank you very much.

Gerard

ReportPro 3.9 and sql table swap

Posted: Sat Mar 19, 2022 1:37 pm
by wriedmann
Hi Gerard,
probaby Windows 11 blocks your executable because it was downloaded from an internet page.
That is a standard Windows behavior.
You should right click the file in Windows explorer, uncheck this option (in my case German Windows 11), and save:
unblock_exe.png
unblock_exe.png (30.25 KiB) Viewed 1317 times
HTH
Wolfgang

ReportPro 3.9 and sql table swap

Posted: Sat Mar 19, 2022 1:50 pm
by gjbiagiotti
Wolfgang
That's what I did and I already have the latest version running.
Thanks.

Gerard