cancel
Showing results for 
Search instead for 
Did you mean: 

Dll integration with Viewer : Setting the SQL server login parameters

Former Member
0 Kudos

Let's see if I can figure this out enough to ask an intelligent question.

I'm using Microsoft SQL 2005.

I bought a library to use the report viewer in the obscure dialect I program in, "Clarion." It uses the crpe32.dll to display and print reports. My idea here is to use Crystal instead of Clarion's brain damaged reporting system and ship the rpt files to the clients so they can run the reports on their data. I can successfully open a report and display/print/export from my Clarion program, but only as long as I'm querying my database. Of course, the customers will want to see their data, not mine.

Whenever I try to set the login information to another server/database/user/password I get error boxes about can't find the table. The "other" database has the same table names, that's how my silly program finds its data.

Let's see. I open and init the report, then do PEDiscardSavedData so it will fetch data from the server, then PESetNthTableLogOnInfo. Next, it loops through the sections using PEGetSectionCode to see if there are sub reports. If there are, on each sub report it does PEGetSubreportInfo, PEOpenSubreport and PSESetNthTableLogOnInfo...

Then it sets any function values...

And then:

PEShowPrintControls,

PEOutputToWindow,

PESetWindowOptions,

PEStartPrintJob

PEGetWindowHandle

And poof! The report appears magically, as long as the server/database/user/password were the same as I used when I initially designed the report. I have tested to see that it actually fetches data from the db.

Maybe I should design the reports ODBC and require a fixed data source name that attatches to whatever db the client is using? I think I've been trying OLE DB.

Confused, puzzled, and about half a bubble off level.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Tom, problem is crpe32 functions that app is using are no longer supported so we can't help you with getting around that 2rd party app.

Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly