4 Problems / Questions

Stimulsoft Reports.NET discussion
Post Reply
mietzekotze
Posts: 39
Joined: Tue Dec 20, 2011 8:07 am
Location: Germany

4 Problems / Questions

Post by mietzekotze »

And hello again,

Today I have 4 problems:

1. Encrypted Documents
I think i have discovered a bug in the viewer. I tried to save a report to a encrypted document with a password, but when i tried to open the document (with double-click) and typed in the password, I got an error-message, which told me, that the password is wrong (which was unlikely, because the password were '1234'), but when i tried to open it with the open viewer via the OpenFileDialog and typed in the password it worked.

2. Force/suggest a name, when saving
Is it possible, to force or suggest a name, when exporting or saving the report?

3. Problem with database
When i try to load a report, that receive its data from a sql-connection, i always get the error, that the connection to the server could not be established. When i try to open the report in the Designer and click on the preview, he shows the report properly. Any idea where might be the mistake?

4. MySQL-Queries
Is it possible to submit values, to specify the result of the report?
For example, when i have a table with dates, and i want the report only to show data from a specified date?


Regards and thanks for the great support,
mietzekotze
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

4 Problems / Questions

Post by HighAley »

Hello.
mietzekotze wrote:1. Encrypted Documents
I think i have discovered a bug in the viewer. I tried to save a report to a encrypted document with a password, but when i tried to open the document (with double-click) and typed in the password, I got an error-message, which told me, that the password is wrong (which was unlikely, because the password were '1234'), but when i tried to open it with the open viewer via the OpenFileDialog and typed in the password it worked.
We reproduced this bug. And let you know when it will be fixed.
mietzekotze wrote:2. Force/suggest a name, when saving
Is it possible, to force or suggest a name, when exporting or saving the report?
If you need to change file name when saving from the Viewer, you should set the 'Report Name' property of the report.
In the Designer you should set the 'Report Name' property in code before calling it.
If you want to change the name of a new report created in the Designer, you should subscribe on CreatingReportInDesigner event.
mietzekotze wrote:3. Problem with database
When i try to load a report, that receive its data from a sql-connection, i always get the error, that the connection to the server could not be established. When i try to open the report in the Designer and click on the preview, he shows the report properly. Any idea where might be the mistake?
Please, describe more detailed how do you get this error. Maybe you could give us some code.
mietzekotze wrote:4. MySQL-Queries
Is it possible to submit values, to specify the result of the report?
For example, when i have a table with dates, and i want the report only to show data from a specified date?
You could specify the date in variable and use it in the query. Also you could use a form. Please, describe your problem more detailed.

Thank you.
mietzekotze
Posts: 39
Joined: Tue Dec 20, 2011 8:07 am
Location: Germany

4 Problems / Questions

Post by mietzekotze »

Aleksey wrote:
mietzekotze wrote:3. Problem with database
When i try to load a report, that receive its data from a sql-connection, i always get the error, that the connection to the server could not be established. When i try to open the report in the Designer and click on the preview, he shows the report properly. Any idea where might be the mistake?
Please, describe more detailed how do you get this error. Maybe you could give us some code.
Since this is the most important problem, i'll start with this.

I run a xampp-server on my computer with a mysql-database. I tried to create a report, that gets its data from the server. When i design the report in the designer, everything works. I can establish a connection to the server and in the preview i see the data displayed. But if i try to open the report in my application, it can't establish a connection to the server. I'll attach my project, the report and a sql-file with the data.
Aleksey wrote:
mietzekotze wrote: 2. Force/suggest a name, when saving
Is it possible, to force or suggest a name, when exporting or saving the report?
If you need to change file name when saving from the Viewer, you should set the 'Report Name' property of the report.
In the Designer you should set the 'Report Name' property in code before calling it.
If you want to change the name of a new report created in the Designer, you should subscribe on CreatingReportInDesigner event.
Could you give a code-example? I tried to call Report.ReportName = "Example" at start of my application, but it didn't suggest this name, when trying to save.


Aleksey wrote:
mietzekotze wrote: 4. MySQL-Queries
Is it possible to submit values, to specify the result of the report?
For example, when i have a table with dates, and i want the report only to show data from a specified date?
You could specify the date in variable and use it in the query. Also you could use a form. Please, describe your problem more detailed.

I think what i looked for, was the declaring of parameters in the Designer and assign them values with Report.Item("@customerid") = 1, but since the sql-queries doesn't work, i'll i have to wait.
Attachments
1546.ReportViewer.zip
(395.99 KiB) Downloaded 178 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

4 Problems / Questions

Post by HighAley »

Hello.
1. Encrypted Documents
I think i have discovered a bug in the viewer. I tried to save a report to a encrypted document with a password, but when i tried to open the document (with double-click) and typed in the password, I got an error-message, which told me, that the password is wrong (which was unlikely, because the password were '1234'), but when i tried to open it with the open viewer via the OpenFileDialog and typed in the password it worked.
We fixed this problem. Please check our next prerelease build tomorrow.
Could you give a code-example? I tried to call Report.ReportName = "Example" at start of my application, but it didn't suggest this name, when trying to save.
Please, try to set the 'Report Alias' property of the report.

We need more time to prepare an answer on your other questions.

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

4 Problems / Questions

Post by HighAley »

Hello.
mietzekotze wrote:
Aleksey wrote:
mietzekotze wrote:3. Problem with database
When i try to load a report, that receive its data from a sql-connection, i always get the error, that the connection to the server could not be established. When i try to open the report in the Designer and click on the preview, he shows the report properly. Any idea where might be the mistake?
Please, describe more detailed how do you get this error. Maybe you could give us some code.
Since this is the most important problem, i'll start with this.

I run a xampp-server on my computer with a mysql-database. I tried to create a report, that gets its data from the server. When i design the report in the designer, everything works. I can establish a connection to the server and in the preview i see the data displayed. But if i try to open the report in my application, it can't establish a connection to the server. I'll attach my project, the report and a sql-file with the data.
You should add next code after StiConfig.Restore()

Code: Select all

StiConfig.Services.Add(New Stimulsoft.Report.Dictionary.StiMySqlAdapterService())
StiConfig.Services.Add(New Stimulsoft.Report.Dictionary.StiMySqlDatabase())
Please, let us know if you still have any additional questions.

Thank you.
mietzekotze
Posts: 39
Joined: Tue Dec 20, 2011 8:07 am
Location: Germany

4 Problems / Questions

Post by mietzekotze »

Aleksey wrote:Please, let us know if you still have any additional questions.
Thank you. Worked for me. Another question: How can i set, that the viewer-component can open *.mrt-files? Because the default configuration is, that i only can open document-files.

Regards
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

4 Problems / Questions

Post by HighAley »

Hello.
mietzekotze wrote:How can i set, that the viewer-component can open *.mrt-files? Because the default configuration is, that i only can open document-files.
Report templates (mrt-files) couldn't be opened in the Viewer. The Viewer can show only rendered reports.

Thank you.
Post Reply