Connectionstring
-
- Posts: 7
- Joined: Wed Mar 18, 2009 5:57 pm
- Location: maroc
Connectionstring
hi, i want to ask how to give a dynamic connectionString to stimulsoftwebDesigner like the one gaves in VB.NET "|DataDirectory|/db.mdf" which enable to us place anywhere our project without change the connectionString thanks for all.(Excuse me for my bad language cause i'm not english)
Connectionstring
Hello,
You can use following code:
Thank you.
You can use following code:
Code: Select all
report.Databases.Clear();
report.Databases.Add(new Stimulsoft.Report.Dictionary.StiOleDbDatabase("NameInReport", ConnectionString);
-
- Posts: 7
- Joined: Wed Mar 18, 2009 5:57 pm
- Location: maroc
Connectionstring
My ConnectionString in Report Designer is AttachDbFilename=H:\Projet\notes\App_Data\gestion_notes.mdf. if i move my database to another directory (E : for exemple) the connection of report is failed cause it can't find database. i want to give a default directory like asp.net the string of sqlconnection is |data directory|/db.mdf. thanks for your reply.
Connectionstring
Hello,
You can use following code:
Thank you.
You can use following code:
Code: Select all
string connectionString= string.Format("AttachDbFilename={0}\gestion_notes.mdf", Stimulsoft.Report.StiConfig.ApplicationDirectory);
report.Databases.Clear();
report.Databases.Add(new Stimulsoft.Report.Dictionary.StiOleDbDatabase("NameInReport", ConnectionString);
Thank you.
-
- Posts: 7
- Joined: Wed Mar 18, 2009 5:57 pm
- Location: maroc
Connectionstring
thanks again for your reply, i want more details about the last message. i copy the code in report, i copy it into vb.net but it doesn't work. i don't know how it work.
Connectionstring
Hello,
You have compilation errors?
Thank you.
You have compilation errors?
Thank you.
-
- Posts: 7
- Joined: Wed Mar 18, 2009 5:57 pm
- Location: maroc
Connectionstring
thanks mrs jan i've resolved the probleme thank you for your help and for your service
Connectionstring
Hello,
Let me know if you need any help.
Thank you.
Let me know if you need any help.
Thank you.
Connectionstring
Can you please explain in greater details about the "NameInReport".
We are currently using CR 8.5 Developer version for all our ASP.Net reporting and we are not happy with the licensing issue and frequent rebooting of the server to release the license should it hit the max - which is 5. Our database is MSSQL 2005 and uses SQLConnection for all reporting purposes. Don't mind using ODBC if it is appropriate. Anyway, we found your product easy to use and develop reports, however, 2 areas we seem to be lost at the moment.
1. Our applications allow user to choose the database they which to logon to. So, the database name changes, depending on the one the user chooses. So, the connection string for the Stimulus report.web must change accordingly. So, how can this be done? We supposed this is similar to the question posted earlier.
We have a lot of sub-reports. Do we need to connect the sub-report data sources as the way CR require us to though the main report is already connected?
2. How to programmatically pass values to filters and parameters?
We are seriously contemplating to change our report writer to others as long as we can have the answers for the above clearly stated how we can overcome it without must changes to our current web forms.
Regards,
KW
We are currently using CR 8.5 Developer version for all our ASP.Net reporting and we are not happy with the licensing issue and frequent rebooting of the server to release the license should it hit the max - which is 5. Our database is MSSQL 2005 and uses SQLConnection for all reporting purposes. Don't mind using ODBC if it is appropriate. Anyway, we found your product easy to use and develop reports, however, 2 areas we seem to be lost at the moment.
1. Our applications allow user to choose the database they which to logon to. So, the database name changes, depending on the one the user chooses. So, the connection string for the Stimulus report.web must change accordingly. So, how can this be done? We supposed this is similar to the question posted earlier.
We have a lot of sub-reports. Do we need to connect the sub-report data sources as the way CR require us to though the main report is already connected?
2. How to programmatically pass values to filters and parameters?
We are seriously contemplating to change our report writer to others as long as we can have the answers for the above clearly stated how we can overcome it without must changes to our current web forms.
Regards,
KW
Connectionstring
Hello,
You can use name of connection in report and any connection string.
customers.name == variable
After then you can use following code for variable initialization in report:
Thank you.
It s name which you give to our connection in report.Can you please explain in greater details about the "NameInReport".
Yes you need similar code:1. Our applications allow user to choose the database they which to logon to. So, the database name changes, depending on the one the user chooses. So, the connection string for the Stimulus report.web must change accordingly. So, how can this be done? We supposed this is similar to the question posted earlier.
Code: Select all
report.Databases.Clear();
report.Databases.Add(new Stimulsoft.Report.Dictionary.StiOleDbDatabase("NameInReport", ConnectionString);
You don't need do something with sub-reports.We have a lot of sub-reports. Do we need to connect the sub-report data sources as the way CR require us to though the main report is already connected?
Declare in report dictionary variable. After then in filter please use expression something like this:2. How to programmatically pass values to filters and parameters?
customers.name == variable
After then you can use following code for variable initialization in report:
Code: Select all
report["variable"] = "test";