Print Page | Close Window

Hooking Report to Dynamic DataSet

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21613
Printed Date: 18 May 2024 at 7:22am


Topic: Hooking Report to Dynamic DataSet
Posted By: regularguy
Subject: Hooking Report to Dynamic DataSet
Date Posted: 22 Jul 2015 at 6:56am
Hi, I have been struggling with this problem for quite some time:

Users of program that we are developing need to have a ablity to create new reports and view them but they can NOT have a direct access to our database and here come the problems:

In order to view report in CrystalViewer You need to login to database or set it in code via TableLogonInfo but we don't want that so what we have already tried:

          We have a WebService which gets desired data from MySql Database based on SQL Query taken from actual report:

SQL_Query ----> WebService ---->MySql ----> WebService ----> Returned DataSet for user and SetdataSource

As You may know DataSet based on SQLQuery returns only 1 table with pulled out results and if we have more than one table in our Report it doesn't work because Crystal is expecting DataSet with the same ammount of tables with identical names.

How we got around it?

We are actually decomposing returned DataSet to the DataSet with the same ammount of tables with the idenctial names - it was working great until we tried to pull out SQLQuery from SubReports inside of Report.
Sadly using GetSqlStatement on SubReport is not supported.

How are we trying to solve it?

Right now we are trying to reconstruct original SQL_Query of Report and SubReports by analyzing TableLinks structure inside ReportDocument.Database property but it is not as simple as we thought and we think that this is a real AROUND WAY for doing what we are trying to achieve.

Any help would be greatly appreciate.




Print Page | Close Window