It is so confusing of using crystal report with database expert
under data tab
on the right side, select my connections, the sql db, then click on add command, then click on ">" button. It will prompt "Add Command to report" window.
Then you add SQL and Parameter
after you finish, if pass the syntax check, then you get it back to the Database Expert window, then you have to right mouse click on the "Command" to view the options to Edit, View or add to repository.
If you have two commands, then you have to link then using the link tab.
Tuesday, December 29, 2015
Visual studio view crystal report field explorer
open the rpt file
Go to view, other windows, document outline
Go to view, other windows, document outline
Thursday, December 17, 2015
Tuesday, December 15, 2015
Monday, December 14, 2015
configuration transform extension for app config file
https://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5
https://visualstudiogallery.msdn.microsoft.com/579d3a78-3bdd-497c-bc21-aa6e6abbc859/view/Reviews/0?showReviewForm=True
https://visualstudiogallery.msdn.microsoft.com/579d3a78-3bdd-497c-bc21-aa6e6abbc859/view/Reviews/0?showReviewForm=True
Wednesday, December 9, 2015
Common Web.Config transformations with Visual Studio 2010
http://weblogs.asp.net/srkirkland/common-web-config-transformations-with-visual-studio-2010
First, A Tiny Iota (That guy was great!) of XDT Review
As it pertains to web.config replacements, you need to know that every XML element can have two xdt attributes: xdt:Tranform and xdt:Locator
- Transform: What you want to do with the XML element
- You might want to Replace it, set an attribute (SetAttribute), remove an attribute (RemoveAttribute), etc.
- Locator: Where is the element that needs transformation?
- You probably want to transform an element that matches (Match) a specific attribute value
Case 1: Replacing all AppSettings
This is the overkill case where you just want to replace an entire section of the web.config. In this case I will replace all AppSettings in the web.config will new settings in web.release.config. This is my baseline web.config appSettings:
<appSettings>
<add key="KeyA" value="ValA"/>
<add key="KeyB" value="ValB"/>
</appSettings>
Now in my web.release.config file, I am going to create a appSettings section except I will include the attribute xdt:Transform=”Replace” since I want to just replace the entire element. I did not have to use xdt:Locator because there is nothing to locate – I just want to wipe the slate clean and replace everything.
<appSettings xdt:Transform="Replace">
<add key="ProdKeyA" value="ProdValA"/>
<add key="ProdKeyB" value="ProdValB"/>
<add key="ProdKeyC" value="ProdValC"/>
</appSettings>
Note that in the web.release.config file my appSettings section has three keys instead of two, and the keys aren’t even the same. Now let’s look at the generated web.config file what happens when we publish:
<appSettings>
<add key="ProdKeyA" value="ProdValA"/>
<add key="ProdKeyB" value="ProdValB"/>
<add key="ProdKeyC" value="ProdValC"/>
</appSettings>
Just as we expected – the web.config appSettings were completely replaced by the values in web.release config. That was easy!
Case 2: Replacing a specific AppSetting’s value
Ok, so case 1 was the nuclear option, what about doing something a little more practical? Let’s go back to our original AppSettings web.config example:
<appSettings>
<add key="KeyA" value="ValA"/>
<add key="KeyB" value="ValB"/>
</appSettings>
Let’s say that we just want to replace KeyB’s value to something more suited for a production environment. This time we get to use both xdt:Transform and xdt:Locator.
Our strategy will be to define (in web.release.config) an appSettings section that has just the replacements we want to make. It will initially look like this:
<appSettings>
<add key="KeyB" value="ProdValA" />
</appSettings>
Now we want to add in the transforms so that we replace any appSetting that matches this key (KeyB).
<appSettings>
<add key="KeyB" value="ProdValA" xdt:Transform="Replace" xdt:Locator="Match(key)" />
</appSettings>
Once we publish our resulting web.config file looks like this:
<appSettings>
<add key="KeyA" value="ValA"/>
<add key="KeyB" value="ProdValA"/>
</appSettings>
Perfect – We replaced KeyB but left KeyA (and any other keys if they were to exist) alone.
Case 3: Replace Compilation Debug=”true”
This is a simple one because Microsoft gives it to us out of the box – but I’ll reproduce it here anyway because it illustrates a common scenario and shows that there are more transforms then just Replace:
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
There are also ways to SetAttributes, Remove elements, Insert elements, and much more
To Infinity – And Beyond
We have obviously just scratched the surface, but for now that’s as deep as I need to go. Until next time, you can look at the MSDN reference for Web.Config transformations athttp://msdn.microsoft.com/en-us/library/dd465326%28VS.100%29.aspx.
Enjoy!
find out pdf file size
Control D after open the file in Acrobat reader
Tuesday, December 8, 2015
how do I format SQL in SQuirrel?
Select the SQL, then right click and select Format SQL
Monday, December 7, 2015
Asp.net javascript read application settings
http://forums.asp.net/t/1226181.aspx?Reading+from+web+config+
function ReadConfigurationSettings() {
var wt = '<%=ConfigurationManager.AppSettings("DocPreviewWaitTimeInMilliseconds").ToString() %>'
if (!isNaN(parseInt(wt))) {
return parseInt(wt);
}
else {//defaul to 1 sec.
return 1000;
}
}
Thursday, December 3, 2015
avascript Function Declaration vs Function expressions
https://tckidd.wordpress.com/2013/05/17/javascript-function-declaration-vs-function-expressions/
Tuesday, December 1, 2015
Subscribe to:
Posts (Atom)