Post Author: f'lar
CA Forum: Crystal Reports
I work for a medical billing company. We take reports from our
clients, import them into our system, and then bill insurance or
patient as appropriate. I'm a programmer who is responsible for
writing routines to parse the various formatted files from our
clients. I have never used crystal reports. We have two
clients that send us .rpt files. Of those two sets of .rpt files, one
set is human-readable if I open it in a text editor, so it's no big
deal. The other I have no idea. We have a windows 2000 machine that
we leave running all the time that was set up by a previous programmer
that converts the .rpt files to a usable format (I'll accept .txt,
.csv, .xls, .rtf, or .pdf, among others). I'm not real happy with this
solution because if that machine dies we're up a creek, but this is the
way it's always been. We can't get the program that runs on that
machine to work on any of our other machines (windows xp or server
2003).
I've tried several things to open the .rpt files myself,
including several variety Visual Studio projects and (free or trial)
3rd party viewers. The result is always that whatever application
tries to open the file hangs, and I have to kill the process. I was
finally able to get a file to display something reasonable in Visual
Studio by creating a new report using one of my existing files as a
template. But it's just the layout and formulas for the file rather
than any actual data.
Eventually I had a breakthrough, where I got a dialog box asking
me for connection information for a sql server on the clients network.
I shouldn't need to use this connection, since all the data I care
about is in included in the files from the client. I was able to avoid
the crashes by supplying real (but incorrect) sql server connection
info. At least then I could look at the design view in Visual Studio.Based
on that I on this I have a small program that attempts to load a file
with the template I made and export it to rtf. Unfortunately, it's not
working. First of all, it takes over a minute to load the file, I
figure that is mostly waiting for a timeout from my incorrect database
(which I don't need). In fact, each individual property access takes
that long. When it's finally loaded when I try to export it will give me an error about parameters. I can
see the parameters in the design view, but I can't remove them because
of dependencies I don't know how to find. I worked up some code so that it will prompt me, but If I go ahead and enter
parameters manually (I will need this to be automated) it will eventually
just hang completely (I left it overnight with no progress) on
the ExportToDisk statement.Like I said earlier, I have not used Crystal Reports before. I don't even know which version is used to create the .rpt files. I would really appreciate any tips on how to convert these files into a usable format. I get the feeling I'm going about this the hard way, and there must be something simple I can do to just tell the CR engine to use the file as the datasource.Some additional InformationI sometimes see this error message:Error in formula <CompletedDate>. 'stringVar sDTTM := CStr({vusrPatientExamInfo.CompletedDTTM}, 'MM/dd/yyyy h:mm tt');'The remaining text does not appear to be part of the formula.I considered the possibility that the windows 2000 machine was set up to know how to connect to the client's database mentioned above, but I looked into that and this isn't the case. We've been getting these reports from the client for a long time, and it's more likely I'm seeing an old version of crystal reports the the new system doesn't know how to use but the older version on windows 2000 works just fine. Again, I know nothing so feel free to contradict that if you have a fresh insight. Thanks in advance, and wish me luck posting a question to any discussion board on a Friday evening 😉