First, congratulations on an excellent tool, I have implemented the saving of reports using a server script, everything is fine, but the POST parameter “report” is returning item names collapsed, for example:
Saved with the normal option:
“tema.Derechos humanos en México”,
“tema.Género y DDHH”
Saved from POST parameter “report”
Is eating the spaces.
Can you help.
Thank you for the question.
Actually, we have checked the POST request that is sent from the tool, and it looks ok: http://take.ms/wrovo
Could you please verify your back-end code that it is not truncating the report JSON?
Thank’s for the quick response, as I described, the tool, on the save menu generate a valid JSON File, could you please send me or attach a valid handling script to run on the back-end, i am using asp classic, and this is the code:
Set objStream = CreateObject(“ADODB.Stream”)
objStream.CharSet = “ISO-8859-1”
objStream.SaveToFile “c:\inetpub\wwwroot\webdatarocks-1.0.1\report\” & request(“archivo”) & “.json”, 2
Set objStream = Nothing
Again, thank you for all your help.
With your advise, i have found the solution, i post the solution for ASP Classic for those who face the same dilema.
This is the code of the handler, it executes in the server side.
The header from the Form data (POST), contains 3 key-value parameters, the first is called “name”, the second is “report”, and the third is “type”.
With the use of the below code, you can save the JSON Report structure to any file you want.
Hope this help someone.
If Request.TotalBytes > 0 Then
lngBytesCount = Request.TotalBytes
‘ Split every &; then every =.
Dim myJSONResponse, myJSONReport, myJSONName
myJSONResponse = Split(BytesToStr(Request.BinaryRead(lngBytesCount)),”&”)
myJSONName = Split(myJSONResponse(0),”=”)
myJSONReport = Split(myJSONResponse(1),”=”)
‘ Then write de JSON report part
set f=fs.CreateTextFile(“c:\inetpub\wwwroot\webdatarocks-1.0.1\report\” & myJSONName(1) & “.json”, True)
Set Stream = Server.CreateObject(“Adodb.Stream”)
Stream.Type = 1 ‘adTypeBinary
Stream.Position = 0
Stream.Type = 2 ‘adTypeText
Stream.Charset = “iso-8859-1”
BytesToStr = Stream.ReadText
Set Stream = Nothing
We are glad you have managed to resolve it. Thank you for posting your solution here. We suppose many of our users will find it useful.