Select to view content in your preferred language

Reports including maps and some data

985
6
05-14-2010 02:31 AM
MatejSkerjanc
Regular Contributor
Hello guys i'm pretty new to the ESRI software and also silverlight.

We have this project running for our customers which includes a silverlight app , ESRI map with loads of features ( by that i mean objects, not functions:). It will also include reports. That's where i step in.

I got a task to create reports (probably using crystal reports). Getting selected feature's data wont be much of a problem using identify tool. But the problem is how can i get the map image back to server.
For isntance customer  selects a certain feature and wants to print a report. I figured as much i'll need the map (custom extent) picture back at server to have it included in crystal reports.

Any help is appreciated and if i was incomprehensible i'll explain further if needed.

Thank you for any help
0 Kudos
6 Replies
dotMorten_esri
Esri Notable Contributor
0 Kudos
MatejSkerjanc
Regular Contributor
hmm not sure if i was clear enough. But i found another way calling services with export parameter then "glueing" the pictures together...for now.

But i got new questions. In my mainpage.xaml.cs i have an identify function. When i try to run it it stops because of null reference on
            graphicsLayer.ClearGraphics();

Peculiar fact is the line ahead of this faulty one is:
GraphicsLayer graphicsLayer = MyTestMap.Layers[0] as GraphicsLayer;

But in debug mode i checked that MyTestMap and it's layers are seen. But graphic layer is still null. How come?


And another question. How can i select certain feature, get it's shape file from it and then get coordinates from the shape file.


Sorry for being a nuissance and thank you for your help

Regards
Matej



p.s. i tried the print project you linked me to and there's a problem: Calls to the web service will fail unless the silverlight project is hosted in and launched from the same web project that contains the service. I've had this before but i cannot recall how i fixed it
0 Kudos
AvronPolakow
Occasional Contributor
Please could you list your code showing your way of printing which is different from the sample.
0 Kudos
MatejSkerjanc
Regular Contributor
Oh sure i can, just dont know if this will help you since it doesnt involve actual printing yet. We have two services one for map layer and one for some feature layer. I wasnt involved in the production so far. To get one image of both i call each services with export parameter (using transparent=true&format=pnt&f=image...) then i "glue" these together to get one picture consisting of these two "layers". Sorry if this doesn't help you much...I'm currently stuck at getting feature's (real world) coordinates, i heard i need to get feature then from feature it's shape. p.s. if you still need some code (which is not much to begin with:) let me know
0 Kudos
dotMorten_esri
Esri Notable Contributor
Peculiar fact is the line ahead of this faulty one is:
GraphicsLayer graphicsLayer = MyTestMap.Layers[0] as GraphicsLayer;

Is your first layer a GraphicsLayer? (In most cases it's a dynamic or tiled service used as a base layer)
Remember that "as GraphicsLayer" evaluates to null if it can't do the casting to that type.
0 Kudos
DanDulan
Emerging Contributor
You can use the geometry from the selected feature.
0 Kudos