Re: Occasional SQL Error

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: William Ryan eMVP (bill_at_NoSp4m.devbuzz.com)
Date: 03/23/04


Date: Tue, 23 Mar 2004 02:25:58 -0500

Good deal. Let me ask you something OT. Is the thing the compute supposed
to solve a Report? If so, I'd really check out using Crystal Reports. I
love doing anything with ADO.NET, but I spent about an hour last week doing
some fairly complex OLAP reports. I was all proud of myself until I decided
to see how long it would take me to do it in Crystal. just under 20
minutes. Grouping, Running totals, Subtotals, and formatting is a total
breeze, so is custom formulas and exporting to Excel. Tools like that
really make things easy....

BTW, I'll be at MDC this week and blogging away. If you have any questions
or anything, post a reply http://www.msmvps.com/WilliamRyan/ or drop me an
email and I'll ask the MS dudes and post the discussion. Also, if you are
interested, I'm working on Part IV and V or my Efficient ADO.NET articles
and I'd like to write about the code you posted a while back with Excel. I
have the Word part done, but if you are interested in writing an article
with me, let me know. [We have a really simple to use Article generator
that makes it a breeze] However, I'd love to work on some stuff with you,
Miha, Cor , Skeet, or any of the ADO.NET group

Cheers,

Bill
"scorpion53061" <scorpion_53061@nospamhereeveryahoo.com> wrote in message
news:OCL3VRJEEHA.3372@TK2MSFTNGP10.phx.gbl...
> Yep it sure did!!
>
> Boss was actually happy with my work for a change......Man he can be
> impossible.
>
> This is the text I posted in the Table.Compute thread. You must not have
> seen it.
>
> Jay and Bill,
>
> Thank you very much for your help....
>
> There was a lot of blood on the floor (mostly mine) on this one so to
> speak....
>
> Jay I am working with your solution.....I am running into some problems
but
> since this is working I need to get some reports done with it.
>
> Again thank you very much and if you see anyting here to be alarmed about
> please holler.....
>
> For itemcheck = 0 To dstrancopy.Tables(0).Rows.Count - 1
> For itemcheck1 = 0 To listds.Tables(0).Rows.Count - 1
> If listds.Tables(0).Rows(itemcheck1).Item("ITEMNO") =
> dstrancopy.Tables(0).Rows(itemcheck).Item("ITEM") Then
> alreadyexists = True
> Exit For
> Else
> alreadyexists = False
> End If
> Next
> If alreadyexists = False Then
> 'Dim filter As String = String.Format("(Not TYPE in ('CASH
> CREDIT','INVOICE CREDIT', 'RGA')) and (MONTH = '{0}')",
> Month(r.Item("DATE")))
> drnew1 = listds.Tables(0).NewRow
> drnew1.Item("ITEMNO") =
> dstrancopy.Tables(0).Rows(itemcheck).Item("ITEM")
>
> strexpression = "ITEM = '" &
> dstrancopy.Tables(0).Rows(itemcheck).Item("ITEM") & "' and MONTH = 'Jan'
and
> ((TYPE <> 'INVOICE CREDIT') OR (TYPE <> 'CASH CREDIT') OR (TYPE <>
'RGA'))"
> foundrows = dstrancopy.Tables(0).Select(strexpression)
> If foundrows.Length = 0 Then
> drnew1.Item("JAN") = 0
> drnew1.Item("JANQTY") = 0
> Else
> For Each r In foundrows
> drnew1.Item("JAN") =
r.Table.Compute(r.Item("UCOST")
> * r.Item("QTY"), r.Item("MONTH") = "Jan")
> drnew1.Item("JANQTY") =
> r.Table.Compute(r.Item("QTY"), r.Item("MONTH") = "Jan")
> Next
> End If
>
> strexpression = "ITEM = '" &
> dstrancopy.Tables(0).Rows(itemcheck).Item("ITEM") & "' and MONTH = 'Feb'
and
> ((TYPE <> 'INVOICE CREDIT') OR (TYPE <> 'CASH CREDIT') OR (TYPE <>
'RGA'))"
> foundrows = dstrancopy.Tables(0).Select(strexpression)
> If foundrows.Length = 0 Then
> drnew1.Item("FEB") = 0
> drnew1.Item("FEBQTY") = 0
> Else
> For Each r In foundrows
> drnew1.Item("FEB") =
r.Table.Compute(r.Item("UCOST")
> * r.Item("QTY"), r.Item("MONTH") = "FEB")
> 'CStr(r.Item("DATE")).IndexOf("1/") > -1 Or
> CStr(r.Item("DATE")).IndexOf("01/") > -1)
> drnew1.Item("FEBQTY") =
> r.Table.Compute(r.Item("QTY"), r.Item("MONTH") = "FEB")
> 'CStr(r.Item("DATE")).IndexOf("1/") > -1 Or
> CStr(r.Item("DATE")).IndexOf("01/") > -1)
> Next
> End If
>
> listds.Tables(0).Rows.Add(drnew1)
> End If
>
>
> Next
>
>
>



Relevant Pages

  • Re: Occasional SQL Error
    ... I'd really check out using Crystal Reports. ... > Jay and Bill, ...
    (microsoft.public.sqlserver.programming)
  • Re: Occasional SQL Error
    ... I'd really check out using Crystal Reports. ... > Jay and Bill, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Whats the deal with Crystal Reports?
    ... Admittedly, I am not using the latest version of Crystal Reports, but I ... say I have five disparate elements with a shared property ... at Telerik and Active Reports first, and Crystal Reports only if there is ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: No Touch Deployment Not Working On Some PCs
    ... I've tried placing all the crystal reports dlls in the same application ... When I installed the app to run locally on the machine that would ... >> BusinessObjects assemblies disappear from the Global Assembly Cache. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Err Msg: "Load Report Failed" when running a .NET Windows application
    ... Reports on Terminal Services. ... Our server doesn't have a C drive and we are unable to generate reports ... Please note that the article refers to Crystal Reports 10, ... Just search the registry for ConnectionDirectoryPath where a value is ...
    (microsoft.public.dotnet.languages.csharp)