Hello
I am trying to create a report set for a company with changing table names. Meaning that for each company the erp system is in operation for, the table names are different.
Mening that for one company the GL table is named like this:
[Company X$GL] while for another company the GL table is like this:
[Company Y$GL]
Should I use a stored procedure to handle it, a function... any good ideas before I start experimenting..
I have the possibility of getting the company name from the system, so thats not a problem...
hope for some good advice.David,
You could acheive this by using two reports; The first would get the appropriate company/table name, this report would contain a sub-report, passing the company/table name as a parameter. The sub-report would use a dynamic query, built from the parameter, such as;
="Select * From " & Parameter!Company.Value
You may be able to do it from one report, depending on the order in which the datasets are handled.
Hope that helps
"david" wrote:
> Hello
> I am trying to create a report set for a company with changing table names. Meaning that for each company the erp system is in operation for, the table names are different.
> Mening that for one company the GL table is named like this:
> [Company X$GL] while for another company the GL table is like this:
> [Company Y$GL]
> Should I use a stored procedure to handle it, a function... any good ideas before I start experimenting..
> I have the possibility of getting the company name from the system, so thats not a problem...
> hope for some good advice.|||Terribly sorry for having bothered you all. I was missing a white space in my table name.... *ashamed beyond belief*
"david" wrote:
> Now I tried going another way. I found a text replacing program, that simply runs through all the rdl files and replaces the company X string with the company Y string, so as to fit the database tables names.
> Now when i open the reports and try to open a dataset in the data view:
> all tables are flat, and i can only mark the All columns. When I try running the command, i get the following error:
> ADO error: Invalid object name 'compname$Value Entry'.
> Invalid object name 'Compname@.Customer'.
> Staement(s) could not be prepared. Deferred prepare could not be completed.
>
> heeeeeeeelp
> "david" wrote:
> > Thanks for the reply.
> > I will elaborate a little more on the problem.
> >
> > a Select to get all accounts in account ledger is for example:
> >
> > SELECT No_, Name
> > FROM [Company X$G_L Account]
> >
> > There fore i need to concatenate the company name with the table name. And table names may have blank spaces, so I need the [ ]
> >
> > Besides that, in the books online for reporting services it specifically says that everything need to be inline, and I have som loong select statements... what 2 do?
> >
> >
> > "Chris McGuigan" wrote:
> >
> > > David,
> > > You could acheive this by using two reports; The first would get the appropriate company/table name, this report would contain a sub-report, passing the company/table name as a parameter. The sub-report would use a dynamic query, built from the parameter, such as;
> > > ="Select * From " & Parameter!Company.Value
> > > You may be able to do it from one report, depending on the order in which the datasets are handled.
> > >
> > > Hope that helps
> > >
> > > "david" wrote:
> > >
> > > > Hello
> > > > I am trying to create a report set for a company with changing table names. Meaning that for each company the erp system is in operation for, the table names are different.
> > > >
> > > > Mening that for one company the GL table is named like this:
> > > > [Company X$GL] while for another company the GL table is like this:
> > > > [Company Y$GL]
> > > > Should I use a stored procedure to handle it, a function... any good ideas before I start experimenting..
> > > >
> > > > I have the possibility of getting the company name from the system, so thats not a problem...
> > > >
> > > > hope for some good advice.|||David,
The 1 line restrictions was removed with SP1. Any way by 1 line they really mean one sentence, so;
="SELECT * " &
"FROM [" & Parameters!Company.Value & " X$G_L Account]"
would work OK.
Regards
Chris McGuigan
"david" wrote:
> Thanks for the reply.
> I will elaborate a little more on the problem.
> a Select to get all accounts in account ledger is for example:
> SELECT No_, Name
> FROM [Company X$G_L Account]
> There fore i need to concatenate the company name with the table name. And table names may have blank spaces, so I need the [ ]
> Besides that, in the books online for reporting services it specifically says that everything need to be inline, and I have som loong select statements... what 2 do?
>
> "Chris McGuigan" wrote:
> > David,
> > You could acheive this by using two reports; The first would get the appropriate company/table name, this report would contain a sub-report, passing the company/table name as a parameter. The sub-report would use a dynamic query, built from the parameter, such as;
> > ="Select * From " & Parameter!Company.Value
> > You may be able to do it from one report, depending on the order in which the datasets are handled.
> >
> > Hope that helps
> >
> > "david" wrote:
> >
> > > Hello
> > > I am trying to create a report set for a company with changing table names. Meaning that for each company the erp system is in operation for, the table names are different.
> > >
> > > Mening that for one company the GL table is named like this:
> > > [Company X$GL] while for another company the GL table is like this:
> > > [Company Y$GL]
> > > Should I use a stored procedure to handle it, a function... any good ideas before I start experimenting..
> > >
> > > I have the possibility of getting the company name from the system, so thats not a problem...
> > >
> > > hope for some good advice.sql
Showing posts with label meaning. Show all posts
Showing posts with label meaning. Show all posts
Tuesday, March 20, 2012
Friday, February 10, 2012
changing data source on deploy?
We developed all our reports (a bunch of them) using our development server
named "development" which is not a local server... meaning we cant set our
connection string to localhost when we make them... but then we need to
deploy them to our Live server which then can be localhost as they will only
run on that server... how can we change the connection string's server upon
deployment? also we need to change the traget server to the live one instead
of development... can this be scripted or do we have to change the
connection string manually each and every time we make a change on
development and redeploy to the live server? thanks!The default when deploying is to not overwrite data sources. That means you
only have to change things the first time you deploy to production, after
that you are good to go. No more changes necessary.
As far as target server, in VS you pick the solution configuration, each
solution configuration has its own target server. So you just select the
configuration you want that is appropriate and then deploy to it.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Smokey Grindle" <nospam@.dontspamme.com> wrote in message
news:%23AamjiKRHHA.496@.TK2MSFTNGP06.phx.gbl...
> We developed all our reports (a bunch of them) using our development
> server named "development" which is not a local server... meaning we cant
> set our connection string to localhost when we make them... but then we
> need to deploy them to our Live server which then can be localhost as they
> will only run on that server... how can we change the connection string's
> server upon deployment? also we need to change the traget server to the
> live one instead of development... can this be scripted or do we have to
> change the connection string manually each and every time we make a change
> on development and redeploy to the live server? thanks!
>|||Awesome thanks, but what about for integrated data sources? I found a script
in the same scripts that seems to change the data source its called
PublishSampleReports.rss would this work for changing reports that have
integrated non shared data sources? thanks!
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:eN1imwKRHHA.912@.TK2MSFTNGP06.phx.gbl...
> The default when deploying is to not overwrite data sources. That means
> you only have to change things the first time you deploy to production,
> after that you are good to go. No more changes necessary.
> As far as target server, in VS you pick the solution configuration, each
> solution configuration has its own target server. So you just select the
> configuration you want that is appropriate and then deploy to it.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Smokey Grindle" <nospam@.dontspamme.com> wrote in message
> news:%23AamjiKRHHA.496@.TK2MSFTNGP06.phx.gbl...
>> We developed all our reports (a bunch of them) using our development
>> server named "development" which is not a local server... meaning we cant
>> set our connection string to localhost when we make them... but then we
>> need to deploy them to our Live server which then can be localhost as
>> they will only run on that server... how can we change the connection
>> string's server upon deployment? also we need to change the traget server
>> to the live one instead of development... can this be scripted or do we
>> have to change the connection string manually each and every time we make
>> a change on development and redeploy to the live server? thanks!
>|||I don't know about that. I always used shared data sources.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Smokey Grindle" <nospam@.dontspamme.com> wrote in message
news:uWzPVBLRHHA.3996@.TK2MSFTNGP04.phx.gbl...
> Awesome thanks, but what about for integrated data sources? I found a
> script in the same scripts that seems to change the data source its called
> PublishSampleReports.rss would this work for changing reports that have
> integrated non shared data sources? thanks!
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:eN1imwKRHHA.912@.TK2MSFTNGP06.phx.gbl...
>> The default when deploying is to not overwrite data sources. That means
>> you only have to change things the first time you deploy to production,
>> after that you are good to go. No more changes necessary.
>> As far as target server, in VS you pick the solution configuration, each
>> solution configuration has its own target server. So you just select the
>> configuration you want that is appropriate and then deploy to it.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Smokey Grindle" <nospam@.dontspamme.com> wrote in message
>> news:%23AamjiKRHHA.496@.TK2MSFTNGP06.phx.gbl...
>> We developed all our reports (a bunch of them) using our development
>> server named "development" which is not a local server... meaning we
>> cant set our connection string to localhost when we make them... but
>> then we need to deploy them to our Live server which then can be
>> localhost as they will only run on that server... how can we change the
>> connection string's server upon deployment? also we need to change the
>> traget server to the live one instead of development... can this be
>> scripted or do we have to change the connection string manually each and
>> every time we make a change on development and redeploy to the live
>> server? thanks!
>>
>
named "development" which is not a local server... meaning we cant set our
connection string to localhost when we make them... but then we need to
deploy them to our Live server which then can be localhost as they will only
run on that server... how can we change the connection string's server upon
deployment? also we need to change the traget server to the live one instead
of development... can this be scripted or do we have to change the
connection string manually each and every time we make a change on
development and redeploy to the live server? thanks!The default when deploying is to not overwrite data sources. That means you
only have to change things the first time you deploy to production, after
that you are good to go. No more changes necessary.
As far as target server, in VS you pick the solution configuration, each
solution configuration has its own target server. So you just select the
configuration you want that is appropriate and then deploy to it.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Smokey Grindle" <nospam@.dontspamme.com> wrote in message
news:%23AamjiKRHHA.496@.TK2MSFTNGP06.phx.gbl...
> We developed all our reports (a bunch of them) using our development
> server named "development" which is not a local server... meaning we cant
> set our connection string to localhost when we make them... but then we
> need to deploy them to our Live server which then can be localhost as they
> will only run on that server... how can we change the connection string's
> server upon deployment? also we need to change the traget server to the
> live one instead of development... can this be scripted or do we have to
> change the connection string manually each and every time we make a change
> on development and redeploy to the live server? thanks!
>|||Awesome thanks, but what about for integrated data sources? I found a script
in the same scripts that seems to change the data source its called
PublishSampleReports.rss would this work for changing reports that have
integrated non shared data sources? thanks!
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:eN1imwKRHHA.912@.TK2MSFTNGP06.phx.gbl...
> The default when deploying is to not overwrite data sources. That means
> you only have to change things the first time you deploy to production,
> after that you are good to go. No more changes necessary.
> As far as target server, in VS you pick the solution configuration, each
> solution configuration has its own target server. So you just select the
> configuration you want that is appropriate and then deploy to it.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Smokey Grindle" <nospam@.dontspamme.com> wrote in message
> news:%23AamjiKRHHA.496@.TK2MSFTNGP06.phx.gbl...
>> We developed all our reports (a bunch of them) using our development
>> server named "development" which is not a local server... meaning we cant
>> set our connection string to localhost when we make them... but then we
>> need to deploy them to our Live server which then can be localhost as
>> they will only run on that server... how can we change the connection
>> string's server upon deployment? also we need to change the traget server
>> to the live one instead of development... can this be scripted or do we
>> have to change the connection string manually each and every time we make
>> a change on development and redeploy to the live server? thanks!
>|||I don't know about that. I always used shared data sources.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Smokey Grindle" <nospam@.dontspamme.com> wrote in message
news:uWzPVBLRHHA.3996@.TK2MSFTNGP04.phx.gbl...
> Awesome thanks, but what about for integrated data sources? I found a
> script in the same scripts that seems to change the data source its called
> PublishSampleReports.rss would this work for changing reports that have
> integrated non shared data sources? thanks!
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:eN1imwKRHHA.912@.TK2MSFTNGP06.phx.gbl...
>> The default when deploying is to not overwrite data sources. That means
>> you only have to change things the first time you deploy to production,
>> after that you are good to go. No more changes necessary.
>> As far as target server, in VS you pick the solution configuration, each
>> solution configuration has its own target server. So you just select the
>> configuration you want that is appropriate and then deploy to it.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Smokey Grindle" <nospam@.dontspamme.com> wrote in message
>> news:%23AamjiKRHHA.496@.TK2MSFTNGP06.phx.gbl...
>> We developed all our reports (a bunch of them) using our development
>> server named "development" which is not a local server... meaning we
>> cant set our connection string to localhost when we make them... but
>> then we need to deploy them to our Live server which then can be
>> localhost as they will only run on that server... how can we change the
>> connection string's server upon deployment? also we need to change the
>> traget server to the live one instead of development... can this be
>> scripted or do we have to change the connection string manually each and
>> every time we make a change on development and redeploy to the live
>> server? thanks!
>>
>
Subscribe to:
Posts (Atom)