This is in continuation to one of my previous queries(active reports in C /CLI). I am accessing an xml-based active report from a C++/CLI application. Is there any way by which I can have a data communication with the active report from C++/CLI, for example, I want to print the managed data present in the C++/CLI application on the details section of the XML report which the application accesses. I don't want to use any c# code. Can it be done? Thanks.
相关问题
- Visual Studio 2010 randomly says the command line
- efficiently calling unmanaged method taking unmana
- How to pass C# method as a callback to CLI/C++ fun
- C++ virtual (sealed) function
- C++/CLI: #pragma managed / unmanaged scope
相关文章
- Capturing stdout from unmanaged DLL in C# caller
- Why could i get an Unhandled exception Access viol
- Marshalling C++ pointer interface back though C# f
- What is the C++ equivalent of the C# checked
- Is it possible to run unmanaged C++ normally from
- Initialize static Dictionary while creating in C++
- Pass an argument to task in C++/CLI?
- LNK1318: Unexpected PDB error; OK (0)
Sure, ActiveReports can do it. Since C++/CLI produces standard .NET objects you can create objects in C++/CLI and ActiveReports will bind to them. Create an IEnumerable collection of objects that you want to bind to (each object in the collection is like a database "row").
Take a look at the examples at Binding Reports to a Data Source. Expand the code sections under the heading To use the IEnumerable data source and you'll see how to do it in C#. You would do precisely the same thing in C++/CLI, you'll just change the syntax from C# to C++/CLI. Clearly, you know C++/CLI syntax so you can do that part, but I think this answers your question regarding how to do this with ActiveReports.
Update based on question asked in comments:
You should be able to handle an ActiveReports' event such as the FetchData event using something like the following code:
I didn't compile this (I don't have AR handy), but it should be close. Please see Microsoft's reference documentation on C++/CLI event syntax here.