Theme and MasterReport from Stream


01-09-2009, 2:09 PM
I am currently evaluating Data Dynamics reports and looking at storing all report metadata (layout, theme, etc) in the database.   It looks like I can store standard Report definition xml via a Stream in the database and I have a prototype of this working. 

Is it possible to load a Report.MasterReport and/or a Report.ThemeUri from a stream instead of a file/URI?  (..besides storing these in the database and creating a file/URI on the fly for use by these properties)

The goal is to allow a multi-user system to share certain fixed MasterReports and Themes which are defined by the administrator.  The user can pick from a pre-definied theme or MasterReport (with datasources pre-defined) via a UI.



Re: Theme and MasterReport from Stream


01-12-2009, 8:49 AM
Hello,

I would like to tell you that you would need to implement a custom resource locator which would query the database for the specific theme and/or master report files needed for the current report. You can find a very basic implementation as an API sample at the following location:
My Documents\Data Dynamics\Reports\version\Samples\API\CustomResourceLocator

As you have mentioned that you also want interactivity with the database then please refer to the following link:
http://www.datadynamics.com/forums/116049/ShowPost.aspx

Let me know if you need further assistance/clarification.

Regards,
Sandeep

Re: Theme and MasterReport from Stream


01-22-2009, 12:49 PM
Sandeep, thanks for the idea on the custom URI ResourceLocator.  This works perfectly when passing a ReportDefinition to preview via the DataDynamics.Reports.Windows.Forms.ReportPreview object's OpenReport(ReportDefinition, ReportTitle) method.  My CustomResourceLocator correctly resolves the MasterReport in this scenario:

ReportDefinition report = LoadReportDefinition(fromDatabaseKey);
report.ResourceLocator = new MyCustomResourceLocator();
report.Report.MasterReport = string.Format("master://{0}", masterDatabaseKey);

However, the same report definition loaded into the designer via the DataDynamics.Reports.Design.User.UserDesignerControl object's Load(stream) method gives a "Master report not found.  Please update the path."  In this case, the code in MyCustomResourceLocator class is not being called even though the report definition contains the ResourceLocator property as above.

Is it possible to dynamically load a Master Report from a stream using the ResourceLocator method in the UserDesignerControl?

Re: Theme and MasterReport from Stream


01-22-2009, 7:50 PM
Hi,
Unfortunately, End User Designer control doesn't allow specifying the ResourceLocator implementation for a report definition that is loaded  to the designer from the stream. I have entered the new feature request for that, the case number is 124763.

Sergey Abakumoff
GrapeCity

Re: Theme and MasterReport from Stream


02-16-2009, 3:24 PM
Excellent: I see 123763 is included as part of  the new 1.5.1051.0 Release.

Re: Theme and MasterReport from Stream


02-17-2009, 4:09 AM
Thanks for your comments on the release of Data Dynamics Reports.

Do let us know if you require further assistance/clarifications.

Best Regards,
Amit
Amit Pal
GrapeCity- DataDynamics