Wednesday, March 7, 2012
Different row colors (AlternatingItemStyle in asp.net)
Is it possible to changes the background color for each row? People coding
asp.net would know this as "AlternatingItemStyle" in a datagrid.
Can this be done using the VS IDE or do I have to go behind the code in the
rdl file?
Best Regards
Jesper.Hello Jesper,
you can put the following into the Background-property in VS IDE:
Backgroundcolor
=IIF(RowNumber("<table1>") Mod 2, "<color1>", "<color2>")
That's all.
Stefan
"Jesper Jensen" <jbj@.union.dk> schrieb im Newsbeitrag
news:egG1HdNrHHA.1204@.TK2MSFTNGP04.phx.gbl...
> Hi everyone!
> Is it possible to changes the background color for each row? People coding
> asp.net would know this as "AlternatingItemStyle" in a datagrid.
> Can this be done using the VS IDE or do I have to go behind the code in
> the rdl file?
> Best Regards
> Jesper.
>|||Hello Stefan
So simple and so powerfull.
Thank you very much!!!!!
Best Regards
Jesper
"Stefan" <stefan@.nospam.nospam> wrote in message
news:eqki9NOrHHA.1168@.TK2MSFTNGP03.phx.gbl...
> Hello Jesper,
> you can put the following into the Background-property in VS IDE:
> Backgroundcolor
>
> =IIF(RowNumber("<table1>") Mod 2, "<color1>", "<color2>")
>
> That's all.
>
> Stefan
>
> "Jesper Jensen" <jbj@.union.dk> schrieb im Newsbeitrag
> news:egG1HdNrHHA.1204@.TK2MSFTNGP04.phx.gbl...
>> Hi everyone!
>> Is it possible to changes the background color for each row? People
>> coding asp.net would know this as "AlternatingItemStyle" in a datagrid.
>> Can this be done using the VS IDE or do I have to go behind the code in
>> the rdl file?
>> Best Regards
>> Jesper.
>
Saturday, February 25, 2012
Different result between using query and call from ASP
I have a problem, my developer create a store procedure to calculate an asset depreciation. He got different result when executed it between directly from query windows and called it from an ASP page. The right result is from query windows.
When I checked the script there's no strange syntax and the used parameters were simple, branch_id and period : fa_sp_calc_depre @.branch_id, @.period, simple isn't it ?
Assume the structure of the query like below :
insert into xxx
select ... from (
select ... from (
select ... from tblA
union all
select ... from tblB
) x
union all
select ... from tblC
union all
select ... from tblD
) x
left join tblB on ...
Best regards,
Hery
If the query executed fine directly then it should not behave differently from your UI.
Can you verify the following items,
1. Connection String - check the server, database name, credentials & etc
2. Parameter - Sometimes programmers set sample param (hard-coded value) & etc.
Finally, you can use the Profiler to profile the query (cross-verify).
|||Hi Manivannan thanks for the reply,I've checked using Profiler and there's nothing with the query, so yesterday I've changed the alias of first subquery into something else. I checked on my computer and it worked fine with right calculation.
But today I found something weird, when our user do the calculation process she got wrong result again. And when I do the process on myu computer (with same program) I got the right result. It getting me more confused now. FYI our program is under web using ASP classic.
Where's the problem anyway ?
Best regards,
Hery|||Hi,
Is anybody help me on this ?
Best regards,
Hery|||
It really sounds like the two different interfaces are hitting two different servers -dev and prod perhaps.
Check the connection string used by the ASP application.
Is it the same server and database that you connect to using the Query windows?
Also, the aliases should not be causing any issue.
|||Hi Arnie, thanks for the reply...
I've checked into the data and found that datetime field always changed when I executed the sp. For example, the period parameter is 200705 means month May year 2007, inside the sp it will generate the start date = 05/01/2007, but sometimes the value of start date would be 01/05/2007 and reproduce wrong result. I put set dateformat mdy inside the sp.
The question now is why the value of start date always changing since the syntax set it hard-coded (start_date = right(period,2)+'/01/'+left(period,4) ? I thought its value would be mdy, CMIIW.
Best regards,
Hery
Friday, February 24, 2012
Different Display based on Text
Example:
Field: Title
Data: Where do "rabbits" come from?
If I try to pull that field into a regular html textbox it dispays,
Where do
Then if I change the textbox to a textarea it displays the entire field
Where do "rabbits" come from?
Is this a setting that causes this in SQL Server on the table.
I am new to SQL Server and am trying to learn these little differences.
Any help would be greatly appreciated.
Thanks,Sounds like an ASP problem. SQL is ignorant of how you are displaying the data.
Perhaps you need to double the quotes when using a textbox?
--> Where do ""rabbits"" come from?
Just guessing.|||Then the quotes get saved as double when you display the field in a different manner.
Friday, February 17, 2012
Different behavior between 2 installs of SQL Server 2000 !
anyone could explain this : I have installed the same asp.net application on 2 distinct hosts, each with its own SQL Server 2000 database.
However, in some SQL queries in Stored Procedures, the results do not come out the same.
For example, on one server the query "select @.value = (select ...)-(select ...)" works and on the other one it returns a null value
Any hint ?
Thanks for your help
Johannoff the top of my head - does one have a different setting for, say, case-sensitivity?
|||
Well, I don't know about this since I am using distant hosting services.
However, the Stored Procedures are identical since I did an automatic install of both databases using one SQL script.
So ...