Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 17th, 2005, 05:05 AM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crystal Reports Engine in Push Mode

Hi,

I want to use a report in PUSH mode, that is, to specify user credentials, dataset et.al. for that report AT RUN TIME !

The report as such I've created in Designer mode with my credentials on an existing view in the database, but...

at runtime the actual user will have to use :

- his own credentials
- a custom generated dataset via SQL statement (obviously with the same structure as the view) but with a different number of lines, depending on the contents of that SQL statement.

What happened so far:

I used the following code:

Dim objReport As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent

sRepName = sRepPath & sRepName & ".rpt"
objReport.Load(sRepName)
objReport.SetDatabaseLogon(sUser, sPassw, sServer, sDataBase)

ReportViewer.ReportSource = Nothing
ReportViewer.ReportSource = objReport

ReportViewer.Show()

My problem is that it worked !
It shouldn't have worked, since the user for which I supplied the credentials doesn't actually have access to the view, so I presume the report just used the Design time credentials, despite the above code !

How should I do it ? Is there a tutorial on the Internet for CREngine in PUSH mode ?

TIA

Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal reports design view mode subhanak Crystal Reports 2 May 4th, 2006 01:29 PM
asp.net push model for crystal reports ewood BOOK: Professional Crystal Reports for VS.NET 2 February 4th, 2005 10:01 AM
push data to crystal report asp.net ewood Crystal Reports 0 January 7th, 2005 02:54 PM
asp.net push model for crystal reports ewood Classic ASP Basics 0 January 7th, 2005 02:12 PM
Ch 8, Crystal Reports Engine, "Set D.B. Location" wpeck BOOK: Professional Crystal Reports for VS.NET 0 January 30th, 2004 04:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.