Showing posts with label datasource. Show all posts
Showing posts with label datasource. Show all posts

Monday, March 26, 2012

How can I change a local connectionstring??

Hi,
this is my connectionstring:
mySqlConnection.ConnectionString = "Data
Source=. \SQLEXPRESS;AttachDbFilename='C:\Documen
ts and Settings\me\Mis
documentos\Visual Studio
2005\Projects\Conferencia\Conferencia\db
Conferencia.mdf';Integrated
Security=True;User Instance=True;"
and the problems comes when I publish the project, because it is not
possible to access to the database which path is in my local computer.
how can I change 'C:\Documents and Settings\me\Mis documentos\Visual
Studio 2005\Projects\Conferencia\Conferencia\db
Conferencia.mdf' for
something like .\dbConferencia.mdf?
I've tried a few different ways, but i didn't get it
Thanks
davidTry putting the mdf in a App_Dat folder in your project/site
and change the connection string from C:Documnet ...
to App_Data\dbConferencia.mdf'
--
Paul Zanbaka
www.mycodekb.com
"dsoto@.plus-supermercados.es" wrote:

> Hi,
> this is my connectionstring:
> mySqlConnection.ConnectionString = "Data
> Source=. \SQLEXPRESS;AttachDbFilename='C:\Documen
ts and Settings\me\Mis
> documentos\Visual Studio
> 2005\Projects\Conferencia\Conferencia\db
Conferencia.mdf';Integrated
> Security=True;User Instance=True;"
> and the problems comes when I publish the project, because it is not
> possible to access to the database which path is in my local computer.
> how can I change 'C:\Documents and Settings\me\Mis documentos\Visual
> Studio 2005\Projects\Conferencia\Conferencia\db
Conferencia.mdf' for
> something like .\dbConferencia.mdf?
> I've tried a few different ways, but i didn't get it
> Thanks
> david
>

How can I change a local connectionstring??

Hi,
this is my connectionstring:
mySqlConnection.ConnectionString = "Data
Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\me\Mis
documentos\Visual Studio
2005\Projects\Conferencia\Conferencia\dbConferenci a.mdf';Integrated
Security=True;User Instance=True;"
and the problems comes when I publish the project, because it is not
possible to access to the database which path is in my local computer.
how can I change 'C:\Documents and Settings\me\Mis documentos\Visual
Studio 2005\Projects\Conferencia\Conferencia\dbConferenci a.mdf' for
something like .\dbConferencia.mdf?
I've tried a few different ways, but i didn't get it
Thanks
david
Try putting the mdf in a App_Dat folder in your project/site
and change the connection string from C:Documnet ...
to App_Data\dbConferencia.mdf'
Paul Zanbaka
www.mycodekb.com
"dsoto@.plus-supermercados.es" wrote:

> Hi,
> this is my connectionstring:
> mySqlConnection.ConnectionString = "Data
> Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\me\Mis
> documentos\Visual Studio
> 2005\Projects\Conferencia\Conferencia\dbConferenci a.mdf';Integrated
> Security=True;User Instance=True;"
> and the problems comes when I publish the project, because it is not
> possible to access to the database which path is in my local computer.
> how can I change 'C:\Documents and Settings\me\Mis documentos\Visual
> Studio 2005\Projects\Conferencia\Conferencia\dbConferenci a.mdf' for
> something like .\dbConferencia.mdf?
> I've tried a few different ways, but i didn't get it
> Thanks
> david
>

Friday, March 23, 2012

How can i avoid subreports and datasource in ReportServer browser

Hi ,
How can i avoid dispalying of
"SubReports and datasource in ReportServer Browser"
if any one have answer plz let me know
ThanksOn the object properties select hide in list view.
"simmi" wrote:
> Hi ,
> How can i avoid dispalying of
> "SubReports and datasource in ReportServer Browser"
> if any one have answer plz let me know
> Thanks|||Thanks john
I think u r telling to hide it on the ReportManager browser.
But i want to hide in ReportServer Browser.
could u explain me in detail
"johnE" wrote:
> On the object properties select hide in list view.
> "simmi" wrote:
> > Hi ,
> >
> > How can i avoid dispalying of
> > "SubReports and datasource in ReportServer Browser"
> >
> > if any one have answer plz let me know
> >
> > Thanks|||and how do you unhide a report using ReportManager?
"simmi" wrote:
> Thanks john
> I think u r telling to hide it on the ReportManager browser.
> But i want to hide in ReportServer Browser.
> could u explain me in detail
> "johnE" wrote:
> > On the object properties select hide in list view.
> >
> > "simmi" wrote:
> >
> > > Hi ,
> > >
> > > How can i avoid dispalying of
> > > "SubReports and datasource in ReportServer Browser"
> > >
> > > if any one have answer plz let me know
> > >
> > > Thanks

Wednesday, March 21, 2012

How can I Associate DataSource with Report using Code

hi,
Thx. in advance.
How can I Associate DataSource with Report using Code.I'm using Reporting
Service Web Serivice
I tried this below code but it is giving error
like
"The data source 'DS_Code_002' cannot be found in this report. --> The data
source 'DS_Code_002' cannot be found in this report"
DataSourceReference reference = new RS.DataSourceReference();
reference.Reference = txtDSPath.Text;
DataSource[] dataSources = new RS.DataSource[1];
DataSource ds = new RS.DataSource();
ds.Item = (RS.DataSourceDefinitionOrReference) reference;
ds.Name = txtDSPath.Text.Substring(txtDSPath.Text.LastIndexOf("/")+1);
dataSources[0] = ds;
rs.SetReportDataSources(txtReportPath.Text, dataSources);
Please help me to resolve the issue.
Thx. again.
regards,
Krishna.MIt took me 2 months to code this after hounding people and digging through
books. I look back and shake my head... :)
Note: FolderPath is the path of where the report root lives... i.e. if your
report was here and called "Top 50 Financial Statements" then the full path
is:
/reports/business/quarterly/Top 50 Financial Statements
and ReportRoot = "/reports/business/quarterly"
RSReports is my reference to the Reporting Service WSDL file (the variable
name you create when reference the reporting services web service)
MyDatasourceName is the name of your datasource. Be sure you specify where
it is exactly. :)
rsDeliverTo is just a variable of RSReports.ReportingService i.e.
Dim rsDeliverTo as RSReports.ReportingService
You should use "rsDeliverTo" to programmatically create your report, so you
can set the datasource in the code below as I have outlined:
Dim reference As New DataSourceReference
reference.Reference = ReportRoot & "/MyDatasourceName"
Dim ReportPathToReport As String = FolderPath + "/" + name
Dim rds() As RSReports.DataSource =rsDeliverTo.GetReportDataSources(ReportPathToReport)
Dim bflag As Boolean = False
Dim strResult As String = ""
For i As Integer = 0 To rds.Length - 1
If TypeOf rds(i).Item Is RSPolarisReports.InvalidDataSourceReference Then
rds(i).Item = CType(reference, DataSourceDefinitionOrReference)
bflag = True
End If
Next i
If (bflag) Then
rsDeliverTo.SetReportDataSources(ReportPathToReport, rds)
End If
Now that you have that, you can then proceed to set the report timeouts,
caching options, etc.
=-Chris
"Krishna kumar.M" <Krishna kumar.M@.discussions.microsoft.com> wrote in
message news:29C00F28-6ED1-4B1B-9BF6-9AFFB8C1CDD6@.microsoft.com...
> hi,
> Thx. in advance.
> How can I Associate DataSource with Report using Code.I'm using Reporting
> Service Web Serivice
> I tried this below code but it is giving error
> like
> "The data source 'DS_Code_002' cannot be found in this report. --> The
> data
> source 'DS_Code_002' cannot be found in this report"
>
> DataSourceReference reference = new RS.DataSourceReference();
> reference.Reference = txtDSPath.Text;
> DataSource[] dataSources = new RS.DataSource[1];
> DataSource ds = new RS.DataSource();
> ds.Item = (RS.DataSourceDefinitionOrReference) reference;
> ds.Name = txtDSPath.Text.Substring(txtDSPath.Text.LastIndexOf("/")+1);
> dataSources[0] = ds;
> rs.SetReportDataSources(txtReportPath.Text, dataSources);
>
> Please help me to resolve the issue.
> Thx. again.
> regards,
> Krishna.M