<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><id>tag:jawadahmad.blog.co.uk,2009-11-09:/</id><title>jawad@solutions</title><link rel="self" href="http://jawadahmad.blog.co.uk/feed/atom/posts/"/><link rel="alternate" type="text/html" href="http://jawadahmad.blog.co.uk/"/><generator version="1.0">MokoFeed</generator><updated>2009-11-09T13:37:36+01:00</updated><entry><id>tag:jawadahmad.blog.co.uk,2006-04-25:/2006/04/25/crystal_reports_aamp_parameters~753557/</id><title>Crystal Reports &amp; Parameters</title><link rel="alternate" type="text/html" href="http://jawadahmad.blog.co.uk/2006/04/25/crystal_reports_aamp_parameters~753557/"/><author><name>jawadahmad</name></author><published>2006-04-25T03:02:22+02:00</published><updated>2006-04-25T03:02:22+02:00</updated><content type="html">	&lt;p&gt;Dont create reports in crystal report by the wizard, infact do like as blank report and then after selecting data source select the add command, then in ur command insert ur query and any place where u are using a where clause , on the side u will see add paramter, so add a parameter and then where u are using the where clause like see&lt;br&gt;
select * from user where user_id={?id}&lt;br&gt;
this id was the new parameter added&lt;br&gt;
select top {?val} * from user&lt;br&gt;
here val is the parameter&lt;br&gt;
after creating the report in the programming, i mean in dotnet&lt;br&gt;
create a text box for the value of the parameter and then, on a button click event write the following code &lt;/p&gt;
	&lt;p&gt;CrystalReport1 cr=new CrystalReport1();&lt;br&gt;
cr.SetParameterValue("id",int.Parse(textBox1.Text));&lt;br&gt;
crystalReportViewer1.ReportSource=cr; &lt;/p&gt;
	&lt;p&gt;this can be accessed by the index number also like by 0, 1 , 2&lt;br&gt;
hope this will be useful
&lt;/p&gt;
&lt;p&gt; &lt;small&gt; &lt;a href="http://jawadahmad.blog.co.uk/2006/04/25/crystal_reports_aamp_parameters~753557/#comments"&gt;Comments&lt;/a&gt; &lt;/small&gt; &lt;/p&gt;</content></entry><entry><id>tag:jawadahmad.blog.co.uk,2006-04-25:/2006/04/25/encrypt_decrypt_web_config_sections~753556/</id><title>Encrypt/Decrypt Web.config Sections</title><link rel="alternate" type="text/html" href="http://jawadahmad.blog.co.uk/2006/04/25/encrypt_decrypt_web_config_sections~753556/"/><author><name>jawadahmad</name></author><published>2006-04-25T03:00:30+02:00</published><updated>2006-04-25T03:00:30+02:00</updated><content type="html">	&lt;p&gt;its not written by me but really useful for me&lt;br&gt;
One of the cool new features of ASP.NET 2.0 is the ability to encrypt any section of the Web.config. This is not directly supported by Visual Studio, however. You need to run aspnet_regiis.exe at a Visual Studio 2005 Command Prompt (look under Visual Studio Tools in your Visual Studio 2005 start menu group).&lt;br&gt;
To encrypt the connectionStrings section of an IIS virtual root based Web site named WebSite1, enter the following at the command prompt:aspnet_regiis -pe "connectionStrings" -app "/ WebSite1"&lt;br&gt;
To decrypt the same section, enter the following:aspnet_regiis -pd "connectionStrings" -app "/ WebSite1" &lt;/p&gt;
	&lt;p&gt;You can also encrypt/decrypt sections of file-system based Web sites. For example, if the same WebSite1 site was not a virtual root and was located in the d:\WebSites folder, you would enter the following at the command prompt instead to encrypt the connectionStrings section:aspnet_regiis -pef "connectionStrings" "d:\WebSites\WebSite1"&lt;br&gt;
And to decrypt the same section of the same Web site:aspnet_regiis -pdf "connectionStrings" "d:\WebSites\WebSite1"
&lt;/p&gt;
&lt;p&gt; &lt;small&gt; &lt;a href="http://jawadahmad.blog.co.uk/2006/04/25/encrypt_decrypt_web_config_sections~753556/#comments"&gt;Comments&lt;/a&gt; &lt;/small&gt; &lt;/p&gt;</content></entry><entry><id>tag:jawadahmad.blog.co.uk,2006-04-25:/2006/04/25/personalization_database_configuration_a~753555/</id><title>Personalization Database Configuration asp.net 2.0</title><link rel="alternate" type="text/html" href="http://jawadahmad.blog.co.uk/2006/04/25/personalization_database_configuration_a~753555/"/><author><name>jawadahmad</name></author><published>2006-04-25T02:57:57+02:00</published><updated>2006-04-25T02:57:57+02:00</updated><content type="html">	&lt;p&gt;By default, web parts uses the SQL 2005 Express provider for data storage. To use SQL Server 2000, you need to do some work:&lt;br&gt;
do create a database in sql server with the name aspnetdb &lt;/p&gt;
	&lt;p&gt;dont get confused when u see (( )) this is coz google gets mad when it sees &amp;lt &amp;gt &lt;/p&gt;
	&lt;p&gt;1. Use the aspnet_regsql.exe tool located in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\ to prepare SQL Server 2000. &lt;/p&gt;
	&lt;p&gt;Essentially it will add the aspnetdb database. &lt;/p&gt;
	&lt;p&gt;2. In Web.config, add the following:&lt;br&gt;
(connectionStrings)&lt;br&gt;
(add name="myconnstring" connectionString="Data Source=your_server_name;Initial Catalog=aspnetdb;Integrated Security=True"providerName="System.Data.SqlClient" /)(/connectionStrings) &lt;/p&gt;
	&lt;p&gt;(system.web)......&lt;br&gt;
(webParts)&lt;br&gt;
(personalizationdefaultProvider="SqlPersonalizationProvider")&lt;br&gt;
(providers)&lt;br&gt;
(add name="SqlPersonalizationProvider"type="System&lt;br&gt;
.Web.UI.WebControls.WebParts&lt;br&gt;
.SqlPersonalizationProvider"connectionStringName=&lt;br&gt;
"myconnstring"applicationName="/" /)(/providers)&lt;br&gt;
(authorization)&lt;br&gt;
(deny users="*" verbs="enterSharedScope" /)&lt;br&gt;
(allow users="*" verbs="modifyState" /)&lt;br&gt;
(/authorization)&lt;br&gt;
(/personalization)&lt;br&gt;
(/webParts)&lt;br&gt;
(/system.web) &lt;/p&gt;
	&lt;p&gt;That should work fine then.
&lt;/p&gt;
&lt;p&gt; &lt;small&gt; &lt;a href="http://jawadahmad.blog.co.uk/2006/04/25/personalization_database_configuration_a~753555/#comments"&gt;Comments&lt;/a&gt; &lt;/small&gt; &lt;/p&gt;</content></entry><entry><id>tag:jawadahmad.blog.co.uk,2006-04-25:/2006/04/25/get_connectionstring_from_web_config~753554/</id><title>Get Connectionstring from web.config</title><link rel="alternate" type="text/html" href="http://jawadahmad.blog.co.uk/2006/04/25/get_connectionstring_from_web_config~753554/"/><author><name>jawadahmad</name></author><published>2006-04-25T02:56:28+02:00</published><updated>2006-04-25T02:56:28+02:00</updated><content type="html">	&lt;p&gt;constring = (string)ConfigurationManager..&lt;br&gt;
.ConnectionStrings["connstr"].ConnectionString; &lt;/p&gt;
	&lt;p&gt;where&lt;br&gt;
connstr is the connectionstring name in web.config
&lt;/p&gt;
&lt;p&gt; &lt;small&gt; &lt;a href="http://jawadahmad.blog.co.uk/2006/04/25/get_connectionstring_from_web_config~753554/#comments"&gt;Comments&lt;/a&gt; &lt;/small&gt; &lt;/p&gt;</content></entry></feed>
