VB Application

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Alan_Klein
Posts: 68
Joined: Tue Oct 10, 2017 12:44 pm

VB Application

Post by Alan_Klein » Mon Sep 01, 2008 10:21 am

Hi Kathleen,____Long time no post, but we are in our fourth phase of development for the application we have produced using R&R under Visual Basic with the custom control. This is actually only a slight modification and I thought there would be no problem, but here is what I am finding:____1. The app runs fine on my development machine, which was used to develop all previous versions, when I run it from within Visual Basic.____2. After installation on any client machine, when I try to run any report it just goes back to our program^s main screen, without running the report.____3. When I manually execute Rswrun on the client machine I am able to run any report. I assume that this means that all of the proper files have been distributed to the client machine. (Is this correct?)____So, my question is what should I be looking for that would allow the Rswrun program to work, but not our application, on a client machine (but which does allow it to run on my development machine)?____Thanks and I hope you had a great summer!__~Alan

Fonz
Posts: 10
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: VB Application

Post by Fonz » Fri Sep 26, 2008 9:08 am

Hello__Have you checked for the existence of an error log. I am sure the R & R produces an error log and most probably, the report runs too quickly on screen and closes due to an error. My guess is that somehow , the data paths and the input paramenter for the report to run are incorrect. These should be set in your Vb code and created dynamically at report runtime based on the User^s requirements. I use R & R SQL a lot from MS Access (VBA) and it reads a Pervasive SQL DB (aka Btrieve) and I have used R & R XBase called from VB applications. The issues I mention above tends to be where the problem is. Hope this is a good starting point.____This is an example of Vb code written to create an Input TXT file for the R & R report and then I call the R & R program and run it:____===============================================================__^GetTmpPath is a function to find the Windows Temp Path on the Client PC and create the text INPUT file in this folder____ParamFile = GetTmpPath() & "RRMbrAddr.txt"____Open ParamFile For Output As #1__For lcount = 1 To 7 __ Select Case lcount__ Case 1__ strText = "RI_REPORT= " & Apppath & "Mbr_Address.RSW"__ Case 2__ strText = "RI_INCLUDE=S" __ Case 3__ ^chr(34) = double quote__ strText = "RI_WHERE= `Fund Code`=" & Chr(34) & [FundCode] & Chr(34)__ strText = strText & " And `Company Code`=" & Chr(34) & [cboCompCode] & Chr(34)__ Case 4__ strText = "RI_PRINTER=CSV"__ Case 5__ strText = "RI_OUTFILE= " & LookPath & "MbrAddr.TXT"__ Case 6__ strText = "RI_DSOURCE =" & [DataSource] ^[DataSource] is a field on screen__ Case 7__ strText = "RI_STATUS=T"__ __ End Select__ Print #1, strText__Next lcount__Close #1____RRReport = "/tt" & Chr(34) & ParamFile & Chr(34)__retval = RunProgramWait(RRPath & " " & RRReport)____If retval <> -1 Then__ MsgBox "Data created successfully", vbInformation, "R & R Report completed!"__End If____==================================================================____Regards__Mark

Post Reply