date format on a chart report and dynamic data source
Hello,
We have a “SampleLocation” GIS point layer, and a flat table called “Test_Benzene” that stores all historic Benzene results, the linking fields are called “LocationID” in both the GIS point layer and the flat table. Both the GIS layer and the flat table are saved on the same SDE server. The task is to create a location specific chart report to show historic Benzene results. So I created a chart report template ( .rpx file), and linked the report template to the feature layer in Geocortex Essentials Manager as shown by attached screenshot.png.
The problems are:
1. I don’t know how to feed the [LocationID] value from the GIS layer to the report template. Right now in the attached report template file, I hardcoded the data source for the chart as below:
Select * from Test_Benzene where [LocationID]='MW12-14' order by [ObjectID];
Would you explain how to get rid of ‘MW12-14’ from the statement above and use a dynamic feed instead?
2. The x Axis of the chart should be date, but now the dates are showing up as numeric values, how to configure t he chart such that the dates display properly in Date format? (Please see attached “ChartSample.png” file).
Could anybody help me out with solving the above two problems?
Thanks ahead!
Jie/customer/servlet/servlet.FileDownload?file=00P6000000em1DzEAI /customer/servlet/servlet.FileDownload?file=00P6000000e88UdEAI
-
Jie,
In response to your first question, you have to set up a parameter on the data link to use the LocationID value from the GIS layer. To do this, go to the Data Links tab of the layer and click on the advanced button (looks like a gear) on the data link in question. On the next screen, click Add Parameter and specify which Feature Field is the LocationID and then give it a Name.
After setting up the parameter, change you selection query to read: Select * from Test_Benzene where [LocationID]={ParameterName}
where ParameterName is the name you specified for the LocationID parameter (keep the squiggly brackets as these tell GE to get the value from the layer). This will pass the value of the selected feature to the query, which can in turn be used in your report by setting up a subreport that points to this data link.
0 -
Hi Guys
I'm probably pushing my luck considering that this post is over a year old....but....
I tried to implement Johns suggestion, with the query SELECT * FROM WILMA_DataMart.Land.TV_WILMA_USAGE WHERE DOCNO = {DOCNO} in the chart control in Report Designer but I get the error below
/customer/servlet/servlet.FileDownload?file=00P6000000elzJOEAY
If i take the WHERE Clause out the chart draws up OK, but then it wont be able to pass the DOCNO parameter in.
Would appreciate any thoughts you might have.
Cheers
Chris
0 -
Are you writing the query for a data link or in the report? If I'm reading my old post correctly, it was for setting up the query in a data link and using it as a sub-report in the main report. It should also be where [LocationID]= @ParameterName
The sub-report just returns the value based on the way the data link query is written.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer