Wednesday, March 28, 2012
How to assign Data Source in URL path
Shared Data Source objects with different database's names in connection
strings. And now how can I switch between these Data Sources ?Dynamic (expression-based) datasource connection strings are not supported
in the current release. See this previous post for a workaround:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=e86a6f2d-3d5e-4dd7-9356-71236347236f
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"IBug" <IBug@.discussions.microsoft.com> wrote in message
news:4F0E598C-4CCF-44D8-800F-7045029DB499@.microsoft.com...
> I have to use one report with several databases. So I've created several
> Shared Data Source objects with different database's names in connection
> strings. And now how can I switch between these Data Sources ?|||"Ravi Mumulla (Microsoft)" wrote:
> Dynamic (expression-based) datasource connection strings are not supported
> in the current release. See this previous post for a workaround:
I have not to change CONNECTION STRING - I would like to assing/bind
different shared data source OBJECTs to the report. Really the problem is:
clients have some divisions base on different databases. The databases are
the same and the user has to run the report on one of these databases. If I
can not change connection string in data source object (as you said) and can
not assing/bind another data source object to the report - what have I do ?
Copy hundreds reports for each databases ? It's not great idea.|||The queries themselves can be expressions as long as they return the same
resulting field lists.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"IBug" <IBug@.discussions.microsoft.com> wrote in message
news:CD967DBC-6AD5-4596-9569-2E0E1AA3DE16@.microsoft.com...
> "Ravi Mumulla (Microsoft)" wrote:
>> Dynamic (expression-based) datasource connection strings are not
>> supported
>> in the current release. See this previous post for a workaround:
> I have not to change CONNECTION STRING - I would like to assing/bind
> different shared data source OBJECTs to the report. Really the problem is:
> clients have some divisions base on different databases. The databases are
> the same and the user has to run the report on one of these databases. If
> I
> can not change connection string in data source object (as you said) and
> can
> not assing/bind another data source object to the report - what have I do
> ?
> Copy hundreds reports for each databases ? It's not great idea.sql
Monday, March 26, 2012
How to append only new records
What would be the steps to create a SSIS job to append records from an ODBC table to a SQL table, adding only the records from the source that do not already exist in the destination?
I have another post on this subject, with a good suggestion for the approach, but I need some more detailed instructions for implementing it:
Have you considered to use a Lookup task in your data flow to check if the row already exists in the destination table and then use the error output (no matches) for inserting only non existing rows? Notice that the error output of the lookup task needs to be set as 'redirect rows' in order to get this behavior
All details here:
Checking if a row exists and if it does, has it changed
(http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx)
(and in the various links from it)
-Jamie
|||This is excellent. Just what I was looking for, and a little bit more...
Many thanks
|||Jamie's answer did the trick
All details here:
Checking if a row exists and if it does, has it changed
(http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx)
(and in the various links from it)
-Jamie
Edit: Can't mark this issue solved...
How to append only new records
What would be the steps to create a SSIS job to append records from an ODBC table to a SQL table, adding only the records from the source that do not already exist in the destination?
I have another post on this subject, with a good suggestion for the approach, but I need some more detailed instructions for implementing it:
Have you considered to use a Lookup task in your data flow to check if the row already exists in the destination table and then use the error output (no matches) for inserting only non existing rows? Notice that the error output of the lookup task needs to be set as 'redirect rows' in order to get this behavior
All details here:
Checking if a row exists and if it does, has it changed
(http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx)
(and in the various links from it)
-Jamie
|||This is excellent. Just what I was looking for, and a little bit more...
Many thanks
|||Jamie's answer did the trick
All details here:
Checking if a row exists and if it does, has it changed
(http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx)
(and in the various links from it)
-Jamie
Edit: Can't mark this issue solved...
Wednesday, March 7, 2012
How to add a variable in Source view ?
There are 3 views in VS IDE, Designer, Code and Source.
In source view, there are html codes, how do I add a variable into it ?
For example:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:JJConnectionString %>"
SelectCommand="SELECT * FROM [Tbl]"
...
How to change the SelectCommand to like:
SelectCommand="SELECT * FROM [Tbl] WHERE [CREATEDBY] = '" & User.Identity.Name & "'"
The User.Identity.Name is not valid in source view, but i need it to work, are there any way ?
Hello my friend,
To use code within aspx/ascx files, you enclose it within <% %> tags. The page directive at the top of your aspx pages is an example of this.
<%@. %> is for directives
<%= %> is for simple printing of code/variables. Try this on your web page: -
<%
=User.Identity.Name %><%# %> is for pre-processing but usually used in binding controls to print/use fields of the data source: -
<asp:Repeater ID="rptCountries" runat="server" Visible="true">
<ItemTemplate>
<td width="200"><%# Container.DataItem("CountryName")%><br/>
</ItemTemplate>
</asp:Repeater>
Kind regards
Scotty