the solution for crystal report error in C#(fail to import report)

hi all,
i am a newbie of c# , i have been suffering a problem on using crystal report in c# while i am using sql server 2000 in my windows server 2000 advanced server
but unfortunely , i can't retrieve the data and show them in crystal report. the error message is like that" failed to import the report" ,though the report refer to my reference book. can anyone solve the problem for me, since my deadline of project is near, thanks all




Answer this question

the solution for crystal report error in C#(fail to import report)

  • thewopr

    i think my data is correct, because i can get the data using data binding
    and i have also  been suffering 2 other problems, the one is how to retrieve the image in database, my team mate said  i could set the name of image as the field name of the table such as staff name , but i am still suffering the problem, any technics on it

    moreover i can't solve with the date format showing in the text field, as we knows, the sql server
    show date and time together with the data type " datetime" , even i know the sql command is " select convert (char(50), fieldname, 101) from tablename but i can't apply this to c# , so when i run the program and select the form , the date and time usually displays together in the text field,

    i am very exhausted on this project , because tons of the report writing and programming i must solve with , please beg you to assist me on those 3 questions. thanks so much



  • RonFarley

    Hi,


    Sorry for the delay. Been busy these few days...
    For your first inquiry, I really don't have anything coz everything's working fine here...


    On your inquiry in image path being stored in your database. Well here's a technique...

    I guess you have a staff table. Try adding a nvarchar(50) field named imgPath. Store the Image Filename on the field... eg 'C:\images\pic1.jpg'
    I assume that you already know datasets and dataadapters so i'll skip into displaying your image...
    If your displaying it in your picturebox, try this:

    PictureBox1.Image = Drawing.Image.FromFile(dataTable1.Rows["imgPath"].ToString());



    On your second inquiry, are you databinding your textbox If so you could check the DataBindings->Advance property of the textbox... there are some formatting options in there...


    Hope this gets you started...




    cheers,


    Paul June A. Domag

  • Ender Koroglu

    anybody would like to solve the problem for me


  • Sharique A.Farooqui

    Hi,

    Can you display the data by opening your report in Crystal If not, then the error might be in your database previleges or security...

    I have experienced the error "failed to import the report" my problem was that the needed dll's was not properly installed on the client... (Try checking on that)

    Could you give me some details Just trying to help...



    cheers,


    Paul June A. Domag

  • sqlizer

    hi,
    i would like to ask about the question that how i encapsulate my program to installed program for someone to install my program to his/her computer.
    thanks
    henry


  • the solution for crystal report error in C#(fail to import report)