| |
|

Data Dynamics Reports Support
Started by James D. Robbins at 07-24-2008 7:00 PM. Topic has 10 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
07-24-2008, 7:00 PM
|
James D. Robbins
Joined on 10-03-2007
Posts 6
|
Navigation - Jump to Report that isn't a file?
|
|
|
|
|
Hello,
I am dynamically loading the report from xml data that is passed to my client from a server and then using the LocateDataSource event to fill it with data from the same service. I would like to be able to link from the this report to others, but I can't seem to find a way to intercept the Jump to Report item and then make a call back to my server to get the new report title. It seems like it is trying to load from a local file.
Is there an event that I can access that includes the parameter list? Or some other way to intercept the report loading that will allow me to provide my reportviewer with the proper report and data that can take the parameters from the first report?
Thanks!
James
|
|
|
|
|
Report
|
|
|
|
07-25-2008, 2:32 PM
|
Jon Smith - DD
Joined on 02-21-2007
Raleigh, NC
Posts 972

|
|
|
James,
In order to add this functionality to your application, you will need to create a custom resource locator for the ReportDefinition prior to loading it into the ReportPreview control.
I have created a small sample which demonstrates how one might go about implementing a custom resource locator for SQL server. In order for the SqlResourceLocator to intercept a resource request, the value for the Jump To Report navigation action would need to be in the following format:
sql://servername/catalogname/reportname.rdlx
This assumes that the table in SQL server has a field which stores the report's filename. I have also included a backup of my database used with the sample. Please note, the reports are loading data from SQL server as well. They are looking for the Reels sample database. (I used the Access Upsizing utility to move Reels.mdb to my local sql server instance).
You're going to be more intersted in the SqlResourceLocator.cs file than any of the data or other code files as this is the place where the interception of the resource handling occurs.
If you have any more questions, feel free to ask.
Thanks, Jon
|
|
|
|
|
Report
|
|
|
|
03-03-2010, 4:50 PM
|
Tiluchi
Joined on 03-02-2010
Posts 10
|
Re: Navigation - Jump to Report that isn't a file?
|
|
|
|
|
Hi Jon
What if I need to use a single xml file for store my report and subreports..
Could you give me a code hand?
Thanks
|
|
|
|
|
Report
|
|
|
|
03-03-2010, 9:55 PM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 3,017

|
Re: Navigation - Jump to Report that isn't a file?
|
|
|
|
|
Hello, The code that extracts the main report and the subreport definitions from the single xml file depends on the file schema. DDR does nothing with that. If you have the sample of such xml file and the code that parses/extracts the content, then please send it to us. Then we can provide the sample that loads the main report and reads the subreports from the single xml storage.
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
03-05-2010, 4:46 PM
|
Tiluchi
Joined on 03-02-2010
Posts 10
|
Re: Navigation - Jump to Report that isn't a file?
|
|
|
|
|
Servey, thanks again
Attached is the structure of my xml file.. there are the layout of the MainReport in ReportFile/Report/Layout and the laout for every subReport in ReportFile/Report/SubReports/SubReport/Layout..
For extracts the content I'm using the System.Xml.XmlDocument framework class
|
|
|
|
|
Report
|
|
|
|
03-05-2010, 4:48 PM
|
Tiluchi
Joined on 03-02-2010
Posts 10
|
|
|
|
|
|
03-07-2010, 11:06 PM
|
Amit Pal
Joined on 12-11-2008
Posts 864

|
Re: Navigation - Jump to Report that isn't a file?
|
|
|
|
|
Hello,
I am working to create a sample as per your requirements.
Amit Pal GrapeCity- DataDynamics
|
|
|
|
|
Report
|
|
|
|
03-09-2010, 10:56 PM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 3,017

|
|
|
Hello, I've attached ASP.NET application that loads the main report and subreports from the single XML Storage. I slightly changed the xml storage schema by adding attribute "name" to the SubReport nodes in order to distinguish the subreports between each other. Brief description of the code: * XmlStorageResourceLocator handles the requests for the resources with names like "xml:subreport1", if it identifies such request then the subreport is read from the xml storage. The fallback to the default resource locator is used otherwise. * The code of Page_Load handler extracts the main report definition from the XML Storage, initializes the ReportDefinition object and sets it's ResourceLocator to the instance of XmlStorageResourceLocator. * Subreport's name in the main report is set to "xml:subreport1" so that the custom resource locator handles it.
Let me know if you have any questions regarding the code.
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
03-13-2010, 9:27 AM
|
Tiluchi
Joined on 03-02-2010
Posts 10
|
|
|
Sergey
thanks for de demo, I've updated your demo with reports generated by me to demostrate an issue. Is throwing me an exception in XmlStorageResourceLocator.GetResource() with this message "Invalid URI: The format of the URI could not be determined."
I attaching the solution, also I modified the version of DDR to 1.5.1052.0 because it is the version that I'm using for evaluation.
Can you take a look and let me know if you see anything that could help?
thanks again for you help
|
|
|
|
|
Report
|
|
|
|
03-14-2010, 10:19 PM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 3,017

|
Re: Navigation - Jump to Report that isn't a file?
|
|
|
|
|
As I mentioned before XmlStorageResourceLocator handles the requests for the resources with names like "xml:subreport1". "xml:subreport1" is valid Uri that consists of the scheme name("xml") and the path("subreport1"). You can read more about URI syntax here. In the application you sent: In the drevealreport.xml XML storage the main report contains the subreport. It's ReportName property is set to "SubRptWithFormattedtext004-Code" which does not correspond "xml:<path>" scheme. In order to fix the problem set ReportName property of subreport to "xml:SubRptWithFormattedtext004-Code" - without quotes. Also, the attribute "name" of Subreport tag in the xml storage should be set to "SubRptWithFormattedtext004-Code". It's currently set to "SubRpt_nTextFields".
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
03-15-2010, 5:45 PM
|
Tiluchi
Joined on 03-02-2010
Posts 10
|
Re: Navigation - Jump to Report that isn't a file?
|
|
|
|
|
Thanks for your help,
I really appreciated that
|
|
|
|
|
Report
|
|
|
|
|
GrapeCity » Product Support » Data Dynamics R... » Navigation - Jump to Report that isn't a file?
|
|
|
|
|