Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. crystal report problem

crystal report problem

Scheduled Pinned Locked Moved Visual Basic
helpdatabase
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    magedhv
    wrote on last edited by
    #1

    i have made report of 115 query and it's working well but the problem here is the report is tooooooo slow what can i do please help

    I 1 Reply Last reply
    0
    • M magedhv

      i have made report of 115 query and it's working well but the problem here is the report is tooooooo slow what can i do please help

      I Offline
      I Offline
      Indrora
      wrote on last edited by
      #2

      the reason its taking so long to work is that you are doing 115 INDIVIDUAL queries... thats 115 new connections to a server and 115 questions of the server.... thats a LOT of data.... Consider using a BackroundWorker of some kind, OR using a berrer query structure... thats why its taking so long. to make it simpler, think of a query as a conversation. You make a query to a server, you start a whole NEW converstion with it. you ask one question ( ie select all from * where foo equals bar) you end the conversation. repeat 115 times. better way to do it: connect to server. ask it "select from * where ( foo = bar) OR (baz = bar) OR ...." parse that data. end connection. no repeat. you only have to understand the data that you are being fed. but the only thing you have to do once is ask the query... not 115 times because you've asked it a really well refined question that can easily be answered. Hope that helps.

      ---- Morgan Gangwere Lead programmer, Unknown Software "Pinky, are you thinking what im thinking?" "I Dunno brain, how many licks DOES it take to get to the tootsie roll center of a tootsie pop?" "You want me to calculate that? or should we take over the world?" "ooh! OooooOOOooH! lets find out!"

      M 1 Reply Last reply
      0
      • I Indrora

        the reason its taking so long to work is that you are doing 115 INDIVIDUAL queries... thats 115 new connections to a server and 115 questions of the server.... thats a LOT of data.... Consider using a BackroundWorker of some kind, OR using a berrer query structure... thats why its taking so long. to make it simpler, think of a query as a conversation. You make a query to a server, you start a whole NEW converstion with it. you ask one question ( ie select all from * where foo equals bar) you end the conversation. repeat 115 times. better way to do it: connect to server. ask it "select from * where ( foo = bar) OR (baz = bar) OR ...." parse that data. end connection. no repeat. you only have to understand the data that you are being fed. but the only thing you have to do once is ask the query... not 115 times because you've asked it a really well refined question that can easily be answered. Hope that helps.

        ---- Morgan Gangwere Lead programmer, Unknown Software "Pinky, are you thinking what im thinking?" "I Dunno brain, how many licks DOES it take to get to the tootsie roll center of a tootsie pop?" "You want me to calculate that? or should we take over the world?" "ooh! OooooOOOooH! lets find out!"

        M Offline
        M Offline
        magedhv
        wrote on last edited by
        #3

        thanks so much for ur help but iam beginner so i would like to see an example because i can't get all ur reply any way i will give one of my sql statement but u have to know that each sql statement is different from the other here is the example Dim s As String Call conn() '''''''''''''''''''''''''''' s = "drop view sanad1" cmd.CommandText = s dr = cmd.ExecuteReader() dr.Close() ''''''''''''''''''''''''''''''''''''''' s = "create view sanad1 as select number from sanad where number = '" + TextBox97.Text + "' " cmd.CommandText = s dr = cmd.ExecuteReader dr.Close() s = 0 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Call conn() '''''''''''''''''''''''''''' s = "drop view sanad2" cmd.CommandText = s dr = cmd.ExecuteReader() dr.Close() ''''''''''''''''''''''''''''''''''''''' s = "create view sanad2 as select topic from sanad where number = '" + TextBox97.Text + "' " cmd.CommandText = s dr = cmd.ExecuteReader dr.Close() s = 0 so please tell me what should i do practicaly thanks so much

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups