Valid Output PDF Format Strings
I have a report activity input called "Output Format". I attempted to use three different type of values, all trying to output in .pdf file format. But I keep
getting report exception errors. Here's what I've tried:
- "Geocortex.Reporting.ReportFormat.Pdf"
- "application/pdf"
- "pdf"
But all three of these lines cause errors?
Walter
-
Try "Pdf".
you may check Site - Rest Endpoint before testing "Report" activity.
- Log on to Open Rest Manager
- Edit a Site where your LayerTemplater report is configured
- Click 'SiteInfo'
- Click 'View RestEndpoint (link icon)'
- navigate to the map - layer - reports
- choose the Report you configured
- Run, which is the same one as 'Report' activity does so you can test it.
NOTE 1 : if your report contains 'Feature Map' which may be take long time to generate a report with the feature map, so test with very small number of features.
NOTE 2: Also, On the GVS, under the Tasks menu, there is 'Reports' submenu too where all configured LayerReport should be populated to use. So test that first to see it can generate the report correctly first.
NOTE 3: You may upload your workflow on the forum to get the more help after testing above trials.
NOTE 4: You may check the Fiddler what request is done on 'Report' client activity too to see the all arguments.
0 -
Munwhan,
My report runs as expected from the layer rest point. Not sure what you mean when you said...."Also, on the GVS?"
I will try the "Pdf" now.
Thanks..Walter
0 -
Munwhan,
"Pdf" doesn't seem to work. I get a rest point error:
{ "error" : { "code" : 400, "hresult" : -2147467259, "message" : "A potentially dangerous Request.Path value was detected from the client (:).", "details" : [ "A potentially dangerous Request.Path value was detected from the client (:)." ] } }
Walter
0 -
First of all,
>Also, on the GVS....
If you are using the default Viewer.xml configuration, GVS (Geocortex Viewer for Silverlight, i.e. your Silverlight Viewer) should have 'Reports' menu under 'Task' menu, which will find all Layer Template Report configuration from Site.xml and be available for a user to execute.
Please test it.
> Error your posted,
You may get the help from Fiddler so that what kind of geometry to use on your Request, and copy it to your SIte-Rest endpoint using the same Request. Also, If above testing works, use the Fiddler to compare what the difference on the request between working request or not-working request on 'Reports' activity.
If you have any progress from above investigation, you may upload your workflow (if possible, expose your map service so others to investigate to help you out).
0 -
Munwhan,
I must be using the default Viewer.xml config file, since the report shows up under the Task>Reports in my viewer. And yes, it runs successfully. It has been configured to only output Pdf files. So the line that is causing the error is in the Common Client > Report > Output Format string.
Walter
/customer/servlet/servlet.FileDownload?file=00P6000000elu3eEAA
0 -
Have you tried with "Pdf", not ".Pdf"?
0 -
Munwhan,
If I try to use just "Pdf", I get this error logged into the system log file:
<Event Timestamp="2013-12-19T13:37:51.5605963-05:00" Level="ERROR" Identity="Guest"><Message>Exception has been thrown by the target of an invocation.
Error performing the query: [Unable to complete operation.].
Unable to complete operation.</Message></Event>When I try the ".Pdf" I get the following error:
<Event Timestamp="2013-12-19T13:36:02.681073-05:00" Level="ERROR" Identity="Guest"><Message>Exception has been thrown by the target of an invocation.
outputFormat parameter invalid. The value '.Pdf' is not a valid outputFormat type.
Requested value '.Pdf' was not found.</Message></Event>Walter
0 -
The error message is not helpful for further investigation.
Also, check the GVS (client logging) by clicking 'Shift - ESc - Esc' to see more deeper logging what error is, and also raise up the logging level of the Essential to Debug level (from Rest Manager interface) and run the workflow again to see the Gcx Essential logging information before the Exception.
As I recommend, you may check the real request content using Fiddler to comapare between two (working one using Task - Report interface, and the one using Workflow).
If you have the Geocortex Support Hours, get the on-hand help about it otherwise.
Munhwan
0 -
Hi Walter,
I think the [Unable to complete Operation] message is being returned from ArcGIS Server.
It is most likely that the workflow is passing the literal string:
WHERE full_name = @FullGraveNumber AND cemetery_id = @CemeteryID
...to ArcGIS Server, which doesn't know what to do with the @FullGraveNumber and @CemeteryID at all. If you have values for these replacement tokens, you can use String.Format to insert them into a WHERE clause:
String.Format("WHERE full_name = '{0}' AND cemetery_id = {1}", fullName, cemeteryID)
"fullName" and "cemeteryID" are Workflow Variables in the above example.
Furthermore, the message about the Potentially Dangerous request value can be avoided if you don't use colons in names of reports (see https://support.geocortex.com/SupportForums/Thread.aspx?pageid=0&mid=2&ItemID=2&thread=46197). It may be possible to instruct IIS to allow these "dangerous" requests if you're confident that they aren't dangerous.
Regards,
-Malcolm
0 -
Malcolm,
I'm using the same string that I have in my data connection. So if I convert that string using the String.Format.... and make my field names into variables,
my original line..." WHERE full_name = @FullGraveNumber and cemetery_id = @CemeteryID "")
My new line would look like ..."String.Format("Where fullname= '{0}' and cemetery_id = '{0}'
And I'm assuming that by having the '{0}' mean bring back everything?
Don't think I have colons in my report name, but I'll check
Walter
0 -
Hi Walter
I think you need to check out what String.Format is actually doing here:
http://msdn.microsoft.com/en-us/library/system.string.format%28v=vs.110%29.aspx
Regards
Ralph
0 -
Thanks for the link Ralph,
Which example am I looking at: C#, C++ or VB?
Walter
0 -
Hi Walter
VB would be the most appropriate
Regards
Ralph
0
Please sign in to leave a comment.
Comments
13 comments