Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Wednesday, March 21, 2012

MS SQL Server 2000 JDBC Driver setDate() bug report

Hi,

Recently, I found a bug in Microsoft's official SQL Server2000 JDBC driver.
It seemed to lie in the Statement's setDate() method. Maybe they simply assumed
all date are represented in 12-hours format.
The test code is below:


public void testMisc() throws Exception {
Connection conn = TransactionManager.getConnection();
String sql = "select count(salescheck0_.ID) as x0_0_ " +
"from T_CHK_OUT_BILL_TEST salescheck0_ " +
"where (salescheck0_.EX_TIME>?)" +
"and(salescheck0_.EX_TIME<?)";
PreparedStatement stmt = conn.prepareCall(sql);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date timefrom = sdf.parse("2004-04-02 00:00:00.000");
Date timeto = sdf.parse("2004-04-02 23:00:00.000");

stmt.setDate(1, new java.sql.Date(timefrom.getTime()));
stmt.setDate(2, new java.sql.Date(timeto.getTime()));
// stmt.setString(1, "2004-04-02 00:00:00.000" );
// stmt.setString(2, "2004-04-02 23:59:59.000" );
ResultSet rs = stmt.executeQuery();
if(rs.next()) {
int count = rs.getInt(1);
System.out.println("count = " + count);
}
}

The test data is following:
ID, SO_ID,WH_ID,CLIENT_ID,CODE,OPERATOR,CHK_OUT_TIME, STATUS,CREATE_TIME,DELIVER_TYPE
86179,67521,1,661,SLCCK200404020016,xuwei,2004-4-2 12:15,20,2004-4-2 9:40,10
86229,67566,1,118,SLCCK200404020066,xuwei,2004-4-2 12:23,20,2004-4-2 9:41,10
86231,67568,1,130,SLCCK200404020068,xuwei,2004-4-2 12:23,20,2004-4-2 9:41,10
86232,67569,1,134,SLCCK200404020069,xuyili,2004-4-2 11:08,20,2004-4-2 9:41,10
86233,67571,1,151,SLCCK200404020070,xuwei,2004-4-2 12:23,20,2004-4-2 9:41,10
86234,67572,1,55,SLCCK200404020071,xuwei,2004-4-2 12:23,20,2004-4-2 9:41,10
86235,67573,1,71,SLCCK200404020072,xuwei,2004-4-2 12:23,20,2004-4-2 9:41,10
86252,67590,1,298,SLCCK200404020089,xuwei,2004-4-2 12:33,20,2004-4-2 9:41,10
86268,67576,1,25,SLCCK200404020105,xuwei,2004-4-2 12:23,20,2004-4-2 10:18,10
86269,67588,1,271,SLCCK200404020106,xuwei,2004-4-2 12:33,20,2004-4-2 10:20,10
86270,67506,1,42,SLCCK200404020107,xuwei,2004-4-2 12:15,20,2004-4-2 10:21,10
86271,67531,1,751,SLCCK200404020108,xuyili,2004-4-2 11:28,20,2004-4-2 10:22,10
86272,67570,1,149,SLCCK200404020109,xuwei,2004-4-2 12:23,20,2004-4-2 10:29,10
86273,67600,1,6,SLCCK200404020110,xuwei,2004-4-2 12:15,20,2004-4-2 10:40,10
86373,67665,3,686,SLCCK200404020210,root,2004-4-2 17:18,20,2004-4-2 16:32,10
86374,67657,3,883,SLCCK200404020211,root,2004-4-2 17:18,20,2004-4-2 16:32,10
86375,67666,3,686,SLCCK200404020212,root,2004-4-2 17:18,20,2004-4-2 16:32,10
86376,54799,1,395,SLCCK200404020213,zhouliyi,2004-4-2 19:52,20,2004-4-2 19:51,10
86377,55383,1,341,SLCCK200404020214,zhoulingyi,200 4-4-2 19:52,20,2004-4-2 19:51,10

Given the code and data, the expected output ought to be "count = 19"
But it's "count = 19" instead.
However, if you set date by using alternative method like the commented statements,
you can get the correct result.


Does anybody know if there exists any patch?
Could we expect Mircosoft to fix this bug? If so, where could I submit this bug report?

Regards,
JustinWhich version of the Microsoft JDBC Driver are you using?|||Originally posted by peterlemonjello
Which version of the Microsoft JDBC Driver are you using?

Don't know very clearly.
It may be rather old.
We have used it for about 2 years.

I notice there is a SP2 of MS SQL Server 2000 JDBC driver.
I'll try it immediately, and feedback ASAP.

Regards,
Justin|||Given the code and data, the expected output ought to be "count = 19"
But it's "count = 19" instead.
So what's wrong with that?sql

Monday, March 19, 2012

MS SQL Reporting Services 2000


Hi, Everybody.

I'm new to MS SQL Reporting services, and i've got some troubles with it. I cannot integrate my report with the site. I've tried to do it in such two ways:
1) using ReportViewer control. But the server where report is stored need authentication, and this control doen't supports it. So every time someone viewed the report authenication screen appeared. And also no images where shown on this report.
2) using Render method. Now i have NO troubles with authentication and with images. It's all great. But there is no Toolbar at the top of the screen where u could export to different formats. But i really need this toolbar. I pass "<DeviceInfo><Toolbar>true</Toolbar>.....</DeviceInfo>" parameter to Render method but still no luck!

Can someone give me some hints about it?
Maybe it is better to do it via ICQ - 237551782

Thanks,

The XML Tags are case sensitive.

Try:

<DeviceInfo><Toolbar>True</Toolbar></DeviceInfo>

|||Are u sure about it? That this is supposed to work? I've tried it, but no result anyway!!!

MS SQL Reporting Service in Windows 2003 Server

Hi,

I tried to Develop one Report in SQL Reporting Service. I have
installed SQL Reporting Serivice in Windows 2003 machine. SQL Server
Database is in another machine, running on Windows 2000. I developed
and deployed the report and all went fine.

When I tried to see the report through the Report Service Manager Web
Page it is comming properly. But When I tried to See the report in
another web page, I'm not able to see the images. But the Data is
getting Displayed and only Image is not comming. When I exported the
report to Excel, the Image is comming over there.

I am using Report Viewer control (Which came as Sample Program) in
the ASPX Page to render the report. I'm using SQL Server 2000 with SP3a
and SQL Server 2000 reporting Service with SP1.

I tried setting the Mime Time for the GIF image and even "*.*" in
the Mime Type settings of IIS 6.0. Even then its not displaying the
image.

Can any one help me out in solving the problem?

Thanks in Advance.

With Regds
KrishRS sp2 is an option. There have been a lot of fixes, but I can't tell if
this specific one was in it.

Regards
----------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@.epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"Krish" <jmkrish@.gmail.com> wrote in message
news:1122361416.772274.179410@.g14g2000cwa.googlegr oups.com...
> Hi,
> I tried to Develop one Report in SQL Reporting Service. I have
> installed SQL Reporting Serivice in Windows 2003 machine. SQL Server
> Database is in another machine, running on Windows 2000. I developed
> and deployed the report and all went fine.
> When I tried to see the report through the Report Service Manager Web
> Page it is comming properly. But When I tried to See the report in
> another web page, I'm not able to see the images. But the Data is
> getting Displayed and only Image is not comming. When I exported the
> report to Excel, the Image is comming over there.
> I am using Report Viewer control (Which came as Sample Program) in
> the ASPX Page to render the report. I'm using SQL Server 2000 with SP3a
> and SQL Server 2000 reporting Service with SP1.
> I tried setting the Mime Time for the GIF image and even "*.*" in
> the Mime Type settings of IIS 6.0. Even then its not displaying the
> image.
> Can any one help me out in solving the problem?
> Thanks in Advance.
> With Regds
> Krish

MS SQL passing in more than 8000 characters

if a user chooses to request a lot of customers to report on say from a multi select listbox - what is the best way to pass this list to my stored proc? Looking for suggestions.

thanks,

Can you post some more details of what you want to do and how you have you are trying to achieve it right now? From the question you've posted it looks like you want to send so much details to your sproc.

|||

hi,

you can use the ntext as a datatype for storing huge values in the sql server 2005.

The value changes dynamically ,so we can use

sqlcmd.paramters.add("paramter Name").value= @.value

By using the above syntax we can give input whatever the value is. but do remeber make the datatype of the field as ntext.

cheeers mate...

VIjay

|||

i apologize for being to vague, it's a sql 2000 db and if all options were selected and thrown into a column the field would exceed the 8000 characters, this has to be saved so the user could re-run the same row if they choose to, so as the users build these requests - they are saved to a db, now maybe i could write the selected lists to an xml file and then pass that into my stored proc paramaters, but i've never done anything like that, possibly save the xml file with a relation to the row and then when the users calls that tracking again - it knows to grab that xml file and feed it to the stored proc? possibly you have seen or done this before.

thanks,

Jeff

Monday, February 20, 2012

MS RS Reportviewer, sparklines and bullet graphs in the report.

Hello All,

For a new reporting project compact we are using MS Reporting Services and hosting the report in an ASP.NET reportviewer.

"Tufte-like" and very clean, simple data visualizations as sparklines and bullet graphs have become a requirement.

We've had some success redering these in ASP but it's become necessary to render them in the reports themselves and we have not found a good way to do it.
Even third party charting products do not seem to support RS very much, one that does requires it on top of analysis services and their sparklines are actually defined in the KPI-s, but we are not using AS.

Have any of you had reports inspired by Tufte or Few and implemented it,
how did you manage it?

as always, your help is greatly appreciated!

Edward Tufte reports!!! Great way to go!

I did some a while back - basically, take a regular column chart and strip away everything from it:

Chart Area - no border/line, no fill
Plot Area - no border/line, no fill
Axis - no labels, no scales, no tickmarks
No Legend
The Palette doesn't have enough options, but the default is best

If you are doing comparisons against, say regions or products, create a separate column chart for each. Keep them the same scale, and lined up (stacked).

You really can do a lot of nice Sparklines using SSRS.

Good luck.

MS RS Report Viewer and "cookieless" session-state

Hello there,

I tried to implement the ReportViewer

(local-mode) in our WebApp. The ReportViewer never rendered the report

and I found out, the problem is the

cookieless="UseUri"

in web.config.

Ist there any way to use the ReportViewer using the cookieless-state?

Thanks, Tobiashttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=685292&SiteID=1

MS RS Report Viewer and "cookieless" session-state

Hello there,

I tried to implement the ReportViewer

(local-mode) in our WebApp. The ReportViewer never rendered the report

and I found out, the problem is the

cookieless="UseUri"

in web.config.

Ist there any way to use the ReportViewer using the cookieless-state?

Thanks, Tobiashttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=685292&SiteID=1

MS ReportViewer 2.0 Control Print Issue

The first attempt to print a report by clicking the print button on the MS
report viewer icon does not print. Subsequent clicks will print the report!
This is happening on all computers the application is deployed to. I look at
the print queue and I see that the job is spooled and I also get the taskbar
notification. I have tested numerous other applications and all print on
first attempt.
Thanks in advance,
AshkanOn Tue, 18 Apr 2006 17:39:13 -0700, "Ashkan Daie" <adaie@.nospam.com>
wrote:
>The first attempt to print a report by clicking the print button on the MS
>report viewer icon does not print. Subsequent clicks will print the report!
>This is happening on all computers the application is deployed to. I look at
>the print queue and I see that the job is spooled and I also get the taskbar
>notification. I have tested numerous other applications and all print on
>first attempt.
>Thanks in advance,
>Ashkan
>
You're right, it doesn't work the first time. It is apparently a bug.
I'm not sure if it works for anyone the first time but it sure doesn't
for me or these other people. It looks like the focus is stuck
somewhere else and any activity will move it to the print button,
includng pressing the print button, but that needs to be done first:
http://forums.microsoft.com/MSDN/showpost.aspx?postid=197115&siteid=1