Thursday, March 29, 2012
Embedded Reports
do i have access to subreports '
for example: how many rows were created?
a have a tablerow with a sub report.
i want to set the visibility to hidden, if no rows were created in the
subreport...
regards
PatrickThe parent report doesn't have access to properties of the subreport.
You may want to consider setting the NoRows property on the subreport
control in the master report.
Or make the subreport control in the master report very small and then have
the subreport hide its own contents if there are no rows of data.
As a last resort, you could put a query in the master report that returns a
count of the rows of the subreport (or if you're calling the subreport
inside of a list, you would include the count as a column in your master
query) and then base the visibility on that count.
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"Patrick Ruhnow" <pruhnow@.dornbracht.de> wrote in message
news:uOSD0kAaEHA.556@.tk2msftngp13.phx.gbl...
> hi,
> do i have access to subreports '
> for example: how many rows were created?
> a have a tablerow with a sub report.
> i want to set the visibility to hidden, if no rows were created in the
> subreport...
>
> regards
> Patrick
>
Monday, March 26, 2012
Emailing report details
I have a simple report that displays a page of text. I want to add a
button to it and
when the button is clicked a new outlook email is created with the
report as body, ready for the user to enter an email address.
Yes I know reports have subscriptions, they want a more adhoc
solution.
And users don't want the extra clicks of saving the report to file and
attaching it themselves.
Can it be done, is there an example?
thanks in advance.On Aug 1, 11:07 pm, paulhux...@.hotmail.com wrote:
> Hi,
> I have a simple report that displays a page of text. I want to add a
> button to it and
> when the button is clicked a new outlook email is created with the
> report as body, ready for the user to enter an email address.
> Yes I know reports have subscriptions, they want a more adhoc
> solution.
> And users don't want the extra clicks of saving the report to file and
> attaching it themselves.
> Can it be done, is there an example?
> thanks in advance.
There are not really any options available for this type of
functionality (aside from what you mentioned). If exporting the report
to PDF and attaching it to an email is an option, I would suggest
going the custom/ASP.NET application route. There is an open source
library available that can assist you in doing this: iTextSharp
(http://sourceforge.net/projects/itextsharp/http://itextsharp.sourceforge.net/tutorial/
). Otherwise, you will need to design a custom application that
includes a report viewer control that incorporates an SSRS report.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Aug 3, 11:31 am, EMartinez <emartinez...@.gmail.com> wrote:
> On Aug 1, 11:07 pm, paulhux...@.hotmail.com wrote:
> > Hi,
> > I have a simple report that displays a page of text. I want to add a
> > button to it and
> > when the button is clicked a new outlook email is created with the
> > report as body, ready for the user to enter an email address.
> > Yes I know reports have subscriptions, they want a more adhoc
> > solution.
> > And users don't want the extra clicks of saving the report to file and
> > attaching it themselves.
> > Can it be done, is there an example?
> > thanks in advance.
> There are not really any options available for this type of
> functionality (aside from what you mentioned). If exporting the report
> to PDF and attaching it to an email is an option, I would suggest
> going the custom/ASP.NET application route. There is an open source
> library available that can assist you in doing this: iTextSharp
> (http://sourceforge.net/projects/itextsharp/http://itextsharp.sourceforge.net/tutorial/
> ). Otherwise, you will need to design a custom application that
> includes a report viewer control that incorporates an SSRS report.
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
****************************
thanks Enrique|||On Aug 2, 9:05 pm, paulhux...@.hotmail.com wrote:
> On Aug 3, 11:31 am, EMartinez <emartinez...@.gmail.com> wrote:
>
> > On Aug 1, 11:07 pm, paulhux...@.hotmail.com wrote:
> > > Hi,
> > > I have a simple report that displays a page of text. I want to add a
> > > button to it and
> > > when the button is clicked a new outlook email is created with the
> > > report as body, ready for the user to enter an email address.
> > > Yes I know reports have subscriptions, they want a more adhoc
> > > solution.
> > > And users don't want the extra clicks of saving the report to file and
> > > attaching it themselves.
> > > Can it be done, is there an example?
> > > thanks in advance.
> > There are not really any options available for this type of
> > functionality (aside from what you mentioned). If exporting the report
> > to PDF and attaching it to an email is an option, I would suggest
> > going the custom/ASP.NET application route. There is an open source
> > library available that can assist you in doing this: iTextSharp
> > (http://sourceforge.net/projects/itextsharp/http://itextsharp.sourcefo...
> > ). Otherwise, you will need to design a custom application that
> > includes a report viewer control that incorporates an SSRS report.
> > Hope this helps.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant
> ****************************
> thanks Enrique
You're welcome. Let me know if I can be of further assistance.
Regards,
Enrique Martinez
Sr. Software Consultant
Emailing from the SQL 2000 server
the reports. Do I need to have Outlook installed on the SQL server to do
these emails.
Also, since outlook uses user profiles I assume that I must log onto the SQL
server as the account used to run SQL server to configure Outlook. If that
is the case, how can I have other administrators configure notifications
without everyone using the same account to configure the SQL server? I
loose accountability when everyone uses the same account.Hello jordan
Yes, thats true, you must install Outlook in the SQL Servers Windows
profile.
But
I use SQLDev.NET:s xp_smtp_sendmail. Its working very good.
http://www.sqldev.net
Then you can create a SQL Alert to use for DBMaint.
http://www.dbmaint.com/SmtpAlerter.asp
Have just tried the Alert, but i dont have it in production
Best Regards
/Jens
Jordan wrote:
> I have a few maintenance routines created and SQL 2000 has options to emai
l
> the reports. Do I need to have Outlook installed on the SQL server to do
> these emails.
> Also, since outlook uses user profiles I assume that I must log onto the S
QL
> server as the account used to run SQL server to configure Outlook. If tha
t
> is the case, how can I have other administrators configure notifications
> without everyone using the same account to configure the SQL server? I
> loose accountability when everyone uses the same account.|||Jordan wrote:
> I have a few maintenance routines created and SQL 2000 has options to emai
l
> the reports. Do I need to have Outlook installed on the SQL server to do
> these emails.
> Also, since outlook uses user profiles I assume that I must log onto the S
QL
> server as the account used to run SQL server to configure Outlook. If tha
t
> is the case, how can I have other administrators configure notifications
> without everyone using the same account to configure the SQL server? I
> loose accountability when everyone uses the same account.
>
Outlook must be installed and a profile configured ONLY under the login
that the SQL services run under, not under each administrator's login.
You'll then configure the SQL Mail component to use that profile. Your
admins will continue to configure notifications as they do now.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Take a look into this URL on configuring Email.
http://classicasp.aspfaq.com/email/...sql-server.html
Thanks
Hari
SQL Server MVP
"Jordan" <none@.here.com> wrote in message
news:eD1DB6rwGHA.888@.TK2MSFTNGP02.phx.gbl...
>I have a few maintenance routines created and SQL 2000 has options to email
>the reports. Do I need to have Outlook installed on the SQL server to do
>these emails.
> Also, since outlook uses user profiles I assume that I must log onto the
> SQL server as the account used to run SQL server to configure Outlook. If
> that is the case, how can I have other administrators configure
> notifications without everyone using the same account to configure the SQL
> server? I loose accountability when everyone uses the same account.
>
Emailing from the SQL 2000 server
the reports. Do I need to have Outlook installed on the SQL server to do
these emails.
Also, since outlook uses user profiles I assume that I must log onto the SQL
server as the account used to run SQL server to configure Outlook. If that
is the case, how can I have other administrators configure notifications
without everyone using the same account to configure the SQL server? I
loose accountability when everyone uses the same account.Hello jordan
Yes, thats true, you must install Outlook in the SQL Servers Windows
profile.
But
I use SQLDev.NET:s xp_smtp_sendmail. Its working very good.
http://www.sqldev.net
Then you can create a SQL Alert to use for DBMaint.
http://www.dbmaint.com/SmtpAlerter.asp
Have just tried the Alert, but i dont have it in production
Best Regards
/Jens
Jordan wrote:
> I have a few maintenance routines created and SQL 2000 has options to email
> the reports. Do I need to have Outlook installed on the SQL server to do
> these emails.
> Also, since outlook uses user profiles I assume that I must log onto the SQL
> server as the account used to run SQL server to configure Outlook. If that
> is the case, how can I have other administrators configure notifications
> without everyone using the same account to configure the SQL server? I
> loose accountability when everyone uses the same account.|||Jordan wrote:
> I have a few maintenance routines created and SQL 2000 has options to email
> the reports. Do I need to have Outlook installed on the SQL server to do
> these emails.
> Also, since outlook uses user profiles I assume that I must log onto the SQL
> server as the account used to run SQL server to configure Outlook. If that
> is the case, how can I have other administrators configure notifications
> without everyone using the same account to configure the SQL server? I
> loose accountability when everyone uses the same account.
>
Outlook must be installed and a profile configured ONLY under the login
that the SQL services run under, not under each administrator's login.
You'll then configure the SQL Mail component to use that profile. Your
admins will continue to configure notifications as they do now.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Take a look into this URL on configuring Email.
http://classicasp.aspfaq.com/email/how-do-i-send-e-mail-from-sql-server.html
Thanks
Hari
SQL Server MVP
"Jordan" <none@.here.com> wrote in message
news:eD1DB6rwGHA.888@.TK2MSFTNGP02.phx.gbl...
>I have a few maintenance routines created and SQL 2000 has options to email
>the reports. Do I need to have Outlook installed on the SQL server to do
>these emails.
> Also, since outlook uses user profiles I assume that I must log onto the
> SQL server as the account used to run SQL server to configure Outlook. If
> that is the case, how can I have other administrators configure
> notifications without everyone using the same account to configure the SQL
> server? I loose accountability when everyone uses the same account.
>
Email with attachments.
I have just setup a new Reporting Service Server. I loaded a page then I created a subscription which will email and excel document of the report out.
Each time the subscription runs I am getting this error below:
Failure sending mail: The report server has encountered a configuration error. See the report server log files for more information.Failure sending mail: The report server has encountered a configuration error. See the report server log files for more information.
When I take out the attachment on the email and just have it send the link the email runs fine with no errors. Is there some type of setup that needs to be done with the server side to have it send attachments?
Please let me know. Thanks
Ken, any luck with this problem?
I'm having the same issue - can email fine when only sending a link in the report subscription, but send fails when attempting to include an attachment. Just getting the following logon failure in the report server logs:
Logon Failure:
Reason: An error occurred during logon
User Name:
Domain:
Logon Type: 3
Logon Process: Authz
Authentication Package: Kerberos
Workstation Name: NZRPTAUC01
Status code: 0x8009030E
Substatus code: 0x0
Caller User Name: LOCAL SERVICE
Caller Domain: NT AUTHORITY
Caller Logon ID: (0x0,0x3E5)
Caller Process ID: 1740
Transited Services: -
Source Network Address: -
Source Port: -
|||
I am having same issue.. have you solved the problem?|||
Yes. The 'Log On' account that your SQL Server Reporting Services service runs under must have permissions to send email via your smtp server.
1. Open Admin Tools > Services on your report server and find the SQL Server Reporting Services service.
2. Double click the service and go to the Log On properties tab to determine the service account.
3. Set permissions on your smtp server to allow the service account to send email.
Email with attachments.
I have just setup a new Reporting Service Server. I loaded a page then I created a subscription which will email and excel document of the report out.
Each time the subscription runs I am getting this error below:
Failure sending mail: The report server has encountered a configuration error. See the report server log files for more information.Failure sending mail: The report server has encountered a configuration error. See the report server log files for more information.
When I take out the attachment on the email and just have it send the link the email runs fine with no errors. Is there some type of setup that needs to be done with the server side to have it send attachments?
Please let me know. Thanks
Ken, any luck with this problem?
I'm having the same issue - can email fine when only sending a link in the report subscription, but send fails when attempting to include an attachment. Just getting the following logon failure in the report server logs:
Logon Failure:
Reason: An error occurred during logon
User Name:
Domain:
Logon Type: 3
Logon Process: Authz
Authentication Package: Kerberos
Workstation Name: NZRPTAUC01
Status code: 0x8009030E
Substatus code: 0x0
Caller User Name: LOCAL SERVICE
Caller Domain: NT AUTHORITY
Caller Logon ID: (0x0,0x3E5)
Caller Process ID: 1740
Transited Services: -
Source Network Address: -
Source Port: -
|||I am having same issue.. have you solved the problem?|||
Yes. The 'Log On' account that your SQL Server Reporting Services service runs under must have permissions to send email via your smtp server.
1. Open Admin Tools > Services on your report server and find the SQL Server Reporting Services service.
2. Double click the service and go to the Log On properties tab to determine the service account.
3. Set permissions on your smtp server to allow the service account to send email.
Email with attachments.
I have just setup a new Reporting Service Server. I loaded a page then I created a subscription which will email and excel document of the report out.
Each time the subscription runs I am getting this error below:
Failure sending mail: The report server has encountered a configuration error. See the report server log files for more information.Failure sending mail: The report server has encountered a configuration error. See the report server log files for more information.
When I take out the attachment on the email and just have it send the link the email runs fine with no errors. Is there some type of setup that needs to be done with the server side to have it send attachments?
Please let me know. Thanks
Ken, any luck with this problem?
I'm having the same issue - can email fine when only sending a link in the report subscription, but send fails when attempting to include an attachment. Just getting the following logon failure in the report server logs:
Logon Failure:
Reason: An error occurred during logon
User Name:
Domain:
Logon Type: 3
Logon Process: Authz
Authentication Package: Kerberos
Workstation Name: NZRPTAUC01
Status code: 0x8009030E
Substatus code: 0x0
Caller User Name: LOCAL SERVICE
Caller Domain: NT AUTHORITY
Caller Logon ID: (0x0,0x3E5)
Caller Process ID: 1740
Transited Services: -
Source Network Address: -
Source Port: -
|||
I am having same issue.. have you solved the problem?|||
Yes. The 'Log On' account that your SQL Server Reporting Services service runs under must have permissions to send email via your smtp server.
1. Open Admin Tools > Services on your report server and find the SQL Server Reporting Services service.
2. Double click the service and go to the Log On properties tab to determine the service account.
3. Set permissions on your smtp server to allow the service account to send email.
Wednesday, March 21, 2012
Email Report in Outlook 2007 not the same as Outlook 2003
I have a Reporting Services 2005 report that is emailed to users. I created/formatted the report based on how it looked in Outlook 2003 which all of our users had at that time. The report is wide, but just fit in the email window when it was full size. Now I have a user who has been converted to Outlook 2007 and he emailed me a copy of the report he received in Outlook 2007 and it looks like it reduced the column sizes; it does not fill the entire email window and wraps the wording on most lines because the column sizes have been reduced.
The report is:
Delivered by: Report Server E-mail
Include Report is checked
Render Format is Web archive
Any ideas on how I can fix this?
Thanks in advance.
I still haven't found a fix for this, however, the user has found that opening the email message in a browser window displays it as expected. I wouldn't consider this a fix, unless all Outlook 2007 users are supposed to open all email messages in a browser window. If not, then it still would be nice to send an email report that is formatted correctly when the message is opened as a regular email message as it used to do in earlier Outlook versions.
|||I am having the same issue.
Has anyone found a solution to this?
I have an embedded image in my header that is not showing either.
Any help would be greatly appreciated.
Thanks, Adrian
|||I am still waiting for a solution. My report does not have an embedded image so I can't help you there. If I ever find a fix, I will post it here.|||We are having the same issue. Just getting my name on this so when anyone updates it i'll get emailed. :-)|||Ditto for me!|||Also having this issue, and have been trying to hack around it for a while. This really should be fixed as a lot of reports in outlook 2007 become almost unreadable when the columns get squished to be so narrow.|||Yet another with the same problem.|||What are the target platforms?
Xp with Outlook 2003 & IE6 is okay?
How about Xp with Outlook 2003 & IE7?
I don't think there is an easy fix for this problem as I reacall reading somewhere that Outlook 2007 uses Word2007, and not IE to render html emails.
|||If you mean which platform correctly displays the reports, then that would be all users who are on XP or newer, with Outlook 2003 and at least IE6. So are you saying that SSRS 2005 reports cannot be displayed inside the email message without opening a browser OR that these reports need to be completely reformatted to display correctly in Outlook 2007? I guess I'm asking if readable reports can even be included in the text of an Outlook 2007 email message? As more users upgrade, this is becoming more of a problem.
|||Outlook 2003 used IE to render html. Outlook 2007 chose to use Word to render html which does not honor the column widths we specify. Search the web for "outlook 2007 html" and you'll find this problem is definately not specific to Reporting Services.
The good news is there is a fix (http://support.microsoft.com/kb/935399) which is part of the latest SQL Server 2005 SP2 Cumulative Updates available from http://support.microsoft.com/kb/936305.
Thanks.
Sunday, March 11, 2012
Email Attachements
but it is empyu in the case of Excel or I get an open error when creating a
PDF file attachment. If insted of using email, I create a file on a server
share it works fine and I see the report. Also if I include a link on the
email that works fine also and I see the report. It's only the attachments
that aren't working. We are using Lotus Notes for our email system.It's a known bug. Apply the hotfix described in M$ KB # 872774
X
"Jeff" wrote:
> Whenever I try to create an attachment with email, the attachment is created
> but it is empyu in the case of Excel or I get an open error when creating a
> PDF file attachment. If insted of using email, I create a file on a server
> share it works fine and I see the report. Also if I include a link on the
> email that works fine also and I see the report. It's only the attachments
> that aren't working. We are using Lotus Notes for our email system.|||A hotfix has been issued for this issue:
http://support.microsoft.com/default.aspx?scid=kb;[LN];872774
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeff" <Jeff@.discussions.microsoft.com> wrote in message
news:A8509E81-7A2C-460F-B82E-F4D06B8C4A83@.microsoft.com...
> Whenever I try to create an attachment with email, the attachment is
> created
> but it is empyu in the case of Excel or I get an open error when creating
> a
> PDF file attachment. If insted of using email, I create a file on a
> server
> share it works fine and I see the report. Also if I include a link on the
> email that works fine also and I see the report. It's only the
> attachments
> that aren't working. We are using Lotus Notes for our email system.
Wednesday, March 7, 2012
EM file is corrupted
try to open EM it tells me that the file is not available or was created
with newer version of EM.
What can I do about it?
thank
Shimon.I resolved it. Let me know if you are interested how I did it.
Shimon.
"Shimon Sim" <estshim@.att.net> wrote in message
news:eKodAwGXFHA.160@.TK2MSFTNGP15.phx.gbl...
>I tried to install Visual Studio 2005 and I corrupted my EM file. Now if I
>try to open EM it tells me that the file is not available or was created
>with newer version of EM.
> What can I do about it?
> thank
> Shimon.
>
EM does not display table created using QA
With EM is open, I use Query Analyser to create a table in Pubs. After I
refresh EM many times, it does not display it. I have to close EM and
reopen it to see the table. When I closes it, EM asks me if I want to save
this new table. Is this normal?
Thanks.Chrissi wrote:
> Hi,
> With EM is open, I use Query Analyser to create a table in Pubs. After
> I refresh EM many times, it does not display it. I have to
> close EM and reopen it to see the table. When I closes it, EM asks
> me if I want to save this new table. Is this normal?
> Thanks.
How are you refreshing the display in SQL EM? You need to right-click on
the Tables item and select the Refresh option.
David Gugick
Imceda Software
www.imceda.com|||Hi,
There are many places that have Refresh option. I.e. under Action menu,
under database node and under the Tables item. The one under database node
does not work. The other two work. So I must have used the one under
database node.
Thanks for your help.
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:%23X8PHyyUFHA.3544@.TK2MSFTNGP10.phx.gbl...
> Chrissi wrote:
> How are you refreshing the display in SQL EM? You need to right-click on
> the Tables item and select the Refresh option.
> --
> David Gugick
> Imceda Software
> www.imceda.com
Friday, February 24, 2012
EL 3.1 and logging to sql server 2005
How do I set up EL to log information to a sql server 2005 DB? I have created the the Database Trace Listener through the configuration utility, but do I need to run some script on the DB to create the tables, sprocs etc? I can't find any script though...
Thanks
Found it in if anyone is interested
\EntLib3Src\App Blocks\Src\Logging\TraceListeners\Database\Scripts
Friday, February 17, 2012
Efficiency of a ''SELECT TOP'' style GROUP BY query: FREETEXT vs. FREETEXTTABLE
Hi,
Please have a look at the following two queries, the purpose of which is to find which ten users (represented by 'Username') have created the most records which contain the term 'foo':
SELECT TOP 10 Username, COUNT(*) AS [Count] FROM Options
WHERE FREETEXT(*, 'foo')
GROUP BY Username
ORDER BY [Count] DESC
SELECT TOP 10 Username, COUNT(*) AS [Count] FROM Options
JOIN FREETEXTTABLE (Options, *, 'foo', 500) ct
ON OptionID = ct.[KEY]
GROUP BY Username
ORDER BY [Count] DESC
They both produce the same result set. However, I am wondering which is more performant. At first glance, it would seem the first one would be. It doesn't involve a JOIN and should, therefore, be more efficient.
But this depends on how the FREETEXT expression is evaluated. My concern is that internally, SQL Server would generate an entire recordset based on 'WHERE FREETEXT(*, 'foo')', which could be thousands of records, and only then restrict this to the TOP 10 by COUNT.
If this does happen, then it would be better to join to a FREETEXTTABLE, where I can at least restrict the result set using the 'top_n_by_rank' parameter (which is set as '500' in this case, as this seems a good balance of performance against the likely number of duplicates I will get in my FREETEXTTABLE results).
So... I am worrying about this unnecessarily? Should I just use the simpler first version?
Any thoughts appreciated.
Thanks
They are almost identical. Implicitly when you do freetext(*,'foo') the system will convert it to a join based on the key. That means the first query will be implicitly converted to:
Code Snippet
select top 10 username, count(*) [count]
from options o join freetexttable(options,*,'foo') ct on o.optionid=ct.key
group by username
order by [count] desc
which is obviously not as efficient as the second query. However, the result between the two will also differ. For the first query, you're doing the join, group by, and then select the top N. The second you limit the first 500 from FTS query before doing the join, group by, and then select top N. So, you've been lucky thus far because the top 500 returned by the FTS contain the top desired 10 for your second query.
|||Hi,
Thanks very much - that is exactly the info I was looking for.
I chose '500' as the top_n_by_rank parameter based on a calculation that, having considered all the other factors in the project I am working on, I am likely to get at least 10 results in the second query in the vast majority of cases.
Thanks for your help.
Wednesday, February 15, 2012
Editing Underlying boolean data without making cells Editable
I'm having a real hard time coming up with a solution to this problem. I created a custom gridview control from Dino Esposito's "Extending Gridview" article which autogenerates a checkbox column that allows for multiple record selection. Once a user checks a box, the entire row gets selected. I added a dropdown list on the top of the page that has only two options, "Yes" or "No". What I'm trying to do is update a boolean column called "contract" (I'm using the Pubs sample database) for all selected rows (via checkboxes checked) depending on whether the user selects "Yes" or "No" from the drop down menu.
For example,
1) the user selects "No" in the dropdown
2) The user checks all rows in the checkbox column for which he wants the all the values"contract" field set to "No"
3) The user then clicks on a button called "Submit" and all selected records get updated to "No" under the "contracts" column.
The idea is to allow the user to change the boolean values from a field for multiple records. Hence, making individual cells editable is pointless. Anybody have an idea how to go about this?
Yes, do you have code you can post? Post it and I'll help.
|||Ok I included the aspx and the aspx.cs code. I'm pretty new with asp.net so the code might not be all that great. Pay no heed to the MenuItems. The Post Back Button is what is supposed to trigger the updates after the selections are made. I appreciate your help.
<%@. Page Language="C#" AutoEventWireup="true" CodeFile="TestSSLServer.aspx.cs" Inherits="TestSSLServer" %><%@. Register Namespace="MsdnMag.CuttingEdge.Controls" TagPrefix="x" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head id="Head1" runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:Menu ID="Menu1" runat="server" BackColor="#E0E0E0" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="8pt" ForeColor="#284E98" Orientation="Horizontal" StaticSubMenuIndent="10px" OnMenuItemClick="Menu1_MenuItemClick"> <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <DynamicHoverStyle BackColor="#284E98" ForeColor="White" /> <DynamicMenuStyle BackColor="#B5C7DE" /> <StaticSelectedStyle BackColor="#507CD1" /> <DynamicSelectedStyle BackColor="#507CD1" /> <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <Items> <asp:MenuItem Text="Personal notes" Value="Notes"></asp:MenuItem> <asp:MenuItem Text="Orders" Value="Orders"></asp:MenuItem> </Items> <StaticHoverStyle BackColor="#284E98" ForeColor="White" /> </asp:Menu> <hr /> <asp:DropDownList ID="DropDownList1" runat="server" Width="133px"> <asp:ListItem Value="True">Yes</asp:ListItem> <asp:ListItem Value="False">No</asp:ListItem> </asp:DropDownList><br /> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PUBSConnectionString%>" SelectCommand="SELECT [au_id], [au_lname], [au_fname], [phone], [address], [city], [state], [zip], [contract] FROM [authors]" /> <x:GridView runat="server" ID="GridView1" AutoGenerateCheckBoxColumn="True" DataSourceID="SqlDataSource1" AllowPaging="True" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" onrowupdating="GridView1_RowUpdating" Font-Names="Verdana" Font-Size="8pt" GridLines="Horizontal" AutoGenerateColumns="False" DataKeyNames="au_id"> <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" /> <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" /> <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" /> <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" /> <AlternatingRowStyle BackColor="#F7F7F7" /> <Columns> <asp:BoundField DataField="au_id" HeaderText="au_id" ReadOnly="True" SortExpression="au_id" /> <asp:BoundField DataField="au_lname" HeaderText="au_lname" SortExpression="au_lname" /> <asp:BoundField DataField="au_fname" HeaderText="au_fname" SortExpression="au_fname" /> <asp:BoundField DataField="phone" HeaderText="phone" SortExpression="phone" /> <asp:BoundField DataField="address" HeaderText="address" SortExpression="address" /> <asp:BoundField DataField="city" HeaderText="city" SortExpression="city" /> <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" /> <asp:BoundField DataField="zip" HeaderText="zip" SortExpression="zip" /> <asp:TemplateField HeaderText="contract" SortExpression="contract"> <itemtemplate> <asp:Label ID="Label1" runat="server" Text='<%# changeTrueFalseToYesNo(Eval("contract"))%>'></asp:Label> </itemtemplate> </asp:TemplateField> </Columns> </x:GridView> <asp:Button runat="server" ID="Button1" Text="Just post back" OnClick="Button1_Click" /> <hr /> <asp:Label ID="Results" runat="server" Text=""></asp:Label> </div> </form></body></html>
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Data.SqlClient;public partialclass TestSSLServer : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e) { }// end Page_Load // The following method displays the string depending on whether the user // clicked on Notes or Orders. There is commented just adds the 0-based // index of the row the the txt string. This is just to check if the indexes // are correct when needed.protected void Menu1_MenuItemClick(object sender, MenuEventArgs e) {string txt ="";if (e.Item.Value =="Notes") txt ="Show personal notes for the following indices:<br>";else txt ="Show orders for the following indices:<br>";foreach (int indexin GridView1.GetSelectedIndices()) {string key = (string)GridView1.DataKeys[index].Value; txt += key +", ";// txt += index + ", "; } Results.Text = txt; }// The following method displays the record when the user // enters the submit button.protected void Button1_Click(object sender, EventArgs e) {// Get the GridViewRow object that represents the row being edited // from the Rows collection of the GridView control.foreach (int indexin GridView1.GetSelectedIndices()) { GridViewRow row = GridView1.Rows[index]; Label contractLabel = (Label)row.FindControl("contract");if (contractLabel.Text.Equals("Yes")) { e.NewValues["contract"] ="No"; }// end else ifelse if (contractLabel.Text.Equals("No")) { e.NewValues["contract"] ="Yes"; }// end else if }// end foreach }// end Button1_Clickprotected string changeTrueFalseToYesNo(object o) {string myString;if (Convert.ToBoolean(o) ==true) { myString ="Yes"; }// end ifelse { myString ="No"; }// end elsereturn myString; }// end changeTrueFalseToYesNo}// end of class
"MsdnMag.CuttingEdge.Controls" TagPrefix="x" %>
|||
I edited the code so that it is more readable. It's easier to see what I'm trying to do. Omit the Gridview1_updating in the markup. Sorry, about the messy code.
Editing SSIS Packages
I have successfully created several SSIS packages in the Development Studio. I want to schedule those packages to run with SQL Agent. The only way I could schedule them was to go to File>Save copy as...(not save as) which would give me a choice of either to save it to SQL Server or SSIS Package Store. Using this method allowed me to schedule the package but then I couldn't figure out how to edit the package without going back into the Development Studio, right-clicking on SSIS packages and selecting "Add Existing Package" and selecting that package from the SSIS Package store then opening it to edit.
That seems like a lot of work to edit a package. Is that the desired way to create, save, schedule and edit a SSIS package?
Thanks for any help.
This is the correct way. The idea is that you have a development version of your package and what is what you edit in BIDS. When you are happy with the package then you deploy it to your production environment. If you want to make changes then make changes to the package in BIDS and redeploy.
-Jamie
|||Thanks so much! That makes me feel better.