Hello all,
I have this problem, I have a work around but I don’t like it. I’m a crystal reports user a long time ago.
I use web services to print reports from “same services in the web”. I have my report file in the database, if I don’t have the rpt file in the report folder under iis dir I extract the file from de database then open the report, change the database connection in runtime and print the reports. This works fine, but I have an issue that I can’t solve.
Sometimes I need to impersonate (in code) the user to the admin (normally in windows server 2008 or 2012, for example to get the installed printers in the system) and when I open the reports with the impersonate option have the “failed open the report”, “don’t have permission”… don’t have permission? Why ? What I do so solve the problem: undo impersonation then use load then impersonation again. Can anyone explain why ?
Dim oRpt1 AsNewReportDocument
oRpt1.Load(Nome_Mapa, OpenReportMethod.OpenReportByDefault)
This behavior is since crystal report for visual studio 2003 to now ….
Thanks in advance.
Jorge Rocha