Error when using Script in Report

Posted by: sourcelink on 28 September 2017, 9:42 am EST

    • Post Options:
    • Link

    Posted 28 September 2017, 9:42 am EST

    [activereports_archive]I created a report that pulls data from a SQL database and it works fine until I add script code on the report.







    In my development machine it shows an error for a missing dll related to a camera control, which we use.



    On a testing machine the error mentions another dll related to quickbooks which we also use, but it is present and installed.







    Please advice.



    [/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]No answer to my post?[/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]Could you please provide me the RPX file of your report which throws this exception? Are you using some code in the script referring to the camera control dll or dll related to quickbooks?



    Regards,

    Ankit Nigam



    [/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]I am not using a RPX file. I am using a form in VB.NET 2008.







    Do you want the form files?







    I am not using any code for cameras or quickbooks. This is the script I am using on the report.







    Function ActiveReport_FetchData(ByVal EOF As Boolean) As Boolean







    If me.rpt.fields(“unittype1”).value=2 Then



    me.rpt.sections(“Detail1”).controls(“Weight1”).visible=false



    End If



    If me.rpt.fields(“unittype1”).value=1 Then



    me.rpt.sections(“Detail1”).controls(“Quantity1”).visible=false



    End If







    If me.rpt.fields(“unittype2”).value=2 Then



    me.rpt.sections(“Detail1”).controls(“Weight2”).visible=false







    End If



    If me.rpt.fields(“unittype2”).value=1 Then



    me.rpt.sections(“Detail1”).controls(“Quantity2”).visible=false



    End If







    If me.rpt.fields(“unittype3”).value=2 Then



    me.rpt.sections(“Detail1”).controls(“Weight3”).visible=false







    End If



    If me.rpt.fields(“unittype3”).value=1 Then



    me.rpt.sections(“Detail1”).controls(“Quantity3”).visible=false



    End If







    If me.rpt.fields(“unittype4”).value=2 Then



    me.rpt.sections(“Detail1”).controls(“Weight4”).visible=false







    End If



    If me.rpt.fields(“unittype4”).value=1 Then



    me.rpt.sections(“Detail1”).controls(“Quantity4”).visible=false



    End If







    ActiveReport_FetchData = EOF



    End Function[/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]Hello,



    Have you used the AddScriptReference method to make reference to the Assemblies you are using in your script?



    Regards,

    Prantik[/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]The error I get is on the report editor during the preview.







    I am not using any assemblies on my script. Or the code I added is considered an assembly?[/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]If I add the reference for addscriptreference I get an error when I run the code on my development machine.







    This is the message I am getting.



    --------------



    Please fix the error in teh code and rebuild the project.







    Error message: could not load file or assembly ‘ActiveReporst6, Version-6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777 c49a3ff’ or one of its depedendencies. The system cannot find the file specified.



    -------------







    I really need a response to this issue please.[/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]Hello,



    Can you send the report files? If you are creating the report through code, can you send us the form file where you have created the same? Besides, is it a windows application or an web project?



    Regards,

    Prantik[/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]Hi,







    it is a windows application.







    I sent the files in a zipped file. I added an extra x to the extension to fool my email, please edit the files to be vendorform.vb and vendorform.resx[/activereports_archive]

  • Posted 28 September 2017, 9:42 am EST

    [activereports_archive]You can send the files on support@grapecity.us.com and also mention the forum link in the mail.



    Regards,

    Ankit Nigam



    [/activereports_archive]

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels