cancel
Showing results for 
Search instead for 
Did you mean: 

CSV issue

Former Member
0 Kudos

Data shown in grid. User has the capability to select a row or all rows from the grid and click submit

button to get data from the database. This submit button can bring back the result set in html or xml or csv format based on users selection. Now the issue is related to CSV. If user select a row or more rows and select to get the results as CSV, result comes back as csv. Now if user close the csv file and select differnet rows and select to get the result as csv ,result comes back as csv . This time user does not close the CSV file of previous selection ,but select differnet rows and try to get results in csv, it brings back the previous result set in the new window, and empty out the previous window.Seems like variables does not get reset in the new selection when previous selected record of CSV file is opened. But this behavior does not happen for HTML and XML.

Can anybody help me?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Sajjad

R u using all those kinds of formats to get with the help of methods

1. showDetail() [for HTML Format]

2. showXMLDetail() [for XML Format]

<b>3. <u>saveAsCSVFile()</u> [for CSV Format]</b>

If no, then i wonder wat methods u r using to get the results in those formats?!

If yes, then see carefully the behaviour of method (underlined) which simply leads much different actions that u faced

Regards

Som

Former Member
0 Kudos

I am using post method from HTML form

Former Member
0 Kudos

Following way i call

// set action

if (strContentType=='text/csv')

{

var i = Math.round(1000*Math.random())

//&InlineTransform=http://localhost/Illuminator/StyleSheets/IllumRowsetCSV.xsl

//&Content-Type=text/csv

document.frmMergedData.action="/Lighthammer/Illuminator?QueryTemplate=PDW/Query Templates/qtXacute_ReadBatchContextResults&Filename=" + i +".csv";

}

if (strContentType=='text/xml')

{

document.frmMergedData.action="/Lighthammer/Illuminator?QueryTemplate=PDW/Query Templates/qtXacute_ReadBatchContextResults&Filename=bogus.xml";

}

if (strContentType=='text/html')

{

document.frmMergedData.action="/Lighthammer/Illuminator?QueryTemplate=PDW/Query Templates/qtXacute_ReadBatchContextResults&Filename=bogus.html";

}

// Submit form.

document.frmMergedData.submit();

I resloved all the issue.But only thing is that when i get popup to open/save csv it shows the fle name as illumin.csv. So if one csv is opened then if i try to open other one it give me waring message that this document is alreay opened and the it get opened finally. And the content of both csv is intact

Former Member
0 Kudos

Sajjad

Though, i found no clue. u may try this if possible.

if (strContentType=='text/csv')

{

document.frmMergedData.action="/Lighthammer/Illuminator?QueryTemplate=PDW/Query Templates/qtXacute_ReadBatchContextResults&Filename=123456.csv";

}

Regards

Som

jcgood25
Active Contributor
0 Kudos

Sajjad,

Try this format sample:

http://localhost/Lighthammer/Illuminator/untitled.csv?Server=Northwind&Mode=FixedQuery&Query=SELECT%...

I'm not sure what you are doing with the InlineTransform, but you don't need it for CSV (the xsl you are referencing is automatically assigned with the StyleSheet property when the Content-Type=text/csv)

You should be able to vary the name of the csv object in your form's action.

Regards,

Jeremy