• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Login screen appears when downloading report to EXCEL

Explorer ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Hi,

Upgrading to 64 bit ColdFusion 2016 and 64 bit 2016 servers.

The current application (on 32 bit Cold Fusion 11, 2008 servers) allows the user to get a report and then download the report into Excel.

When executing the report on 2016 and then requesting the report be downloaded into EXCEL, a login screen appears (does not appear in 32 bit version).

Is there something in Cold Fusion 2016 administrator or on the server to not have the login screen appear?

Thanks,

Mike

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 03, 2018 Jun 03, 2018

UserCold9 wrote:

<CFSET TabChar = Chr(9)>

<CFSET  NewLine = Chr(13) & Chr(10)>

<Cfheader name="Content-Disposition" value="filename=reports.xls">

<CFContent TYPE="application/vnd.ms-excel" RESET="Yes">

These are just instructions to the browser. It is likely that, somewhere else, your code is sending the user to the login page. Perhaps via the Application file.

In any case you have to say whether this is:

inline: <Cfheader name="Content-Disposition" value="inline; filename=reports.xls">

or

attachment: <

...

Votes

Translate

Translate
Engaged ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Lots of questions that might help someone troubleshoot this with you. What login screen are you referring to?  If it is your own login screen, have you tried dumping out SESSION or looking at your cookies to see if your session is being disrupted?  How are you logging in/out the user?  What are your application settings for session and cookies?  Is the request being made on the same domain using the same method (http/https)?

Thanks,

Nic

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

The login screen that appears is the login to the server.

Thanks,

Mike

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

I assume you meant he CFAdmin login.  What URL is the code taking you to that it is requesting a login?  Can you provide any information or code that would be helpful as to how the file is being made available to the user?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

The login to the server, not Cold Fusion admin.

Thanks,

Mike

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Going to need more info to be able to provide any useful help.

-Nic

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Below is the code to create the Excel file. This runs jus fine in Cold Fusion 11.

TabChar = Chr(9)>

NewLine = Chr(13) & Chr(10)>

name="Content-Disposition" value="filename=reports.xls">

TYPE="application/vnd.ms-excel" RESET="Yes">

Thanks,

Mike

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

So you're upgrading both the CF and the server it runs on.

This sounds more like a permissions issue.  If a pop-up dialog appears, requesting a username and password, and it looks like a Windows Server prompt, then (most likely) CF is attempting to access something in a folder to which it doesn't have permission to access.  Like a temp folder, or something like that which is used to generate the report.

HTH,

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

The code is not accessing any folder.

After the code below, is SQL and the code to put the Excel.

TabChar = Chr(9)>

NewLine = Chr(13) & Chr(10)>

name="Content-Disposition" value="filename=reports.xls">

TYPE="application/vnd.ms-excel" RESET="Yes">

Thanks,

Mike

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Something that you're copying is interfering with display, we're not seeing all of what you're pasting.  And I don't think you're including all of the relevant code.

Preran​, I am not familiar with the internal workings of generating an Excel file via CF.  Does CF create a temp file when working with an Excel object?  Is CF still using POI?

V/r,

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

I have pasted the four lines of code that pertains to Excel. In pasting of the code, the forum removed the <CFSET, <CFHeader and <CFContent.

<CFSET TabChar = Chr(9)>

<CFSET  NewLine = Chr(13) & Chr(10)>

<Cfheader name="Content-Disposition" value="filename=reports.xls">

<CFContent TYPE="application/vnd.ms-excel" RESET="Yes">

The rest is the SQL statement and the code to return the results.

I do not know if CF creates temp file for Excel.

What is POI?

Thanks,

Mike

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

userCold9  wrote

I do not know if CF creates temp file for Excel.

What is POI?

I was asking Preran, one of the Adobe staff that occasionally pokes his head in the forums.

V/r,

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 03, 2018 Jun 03, 2018

Copy link to clipboard

Copied

UserCold9 wrote:

<CFSET TabChar = Chr(9)>

<CFSET  NewLine = Chr(13) & Chr(10)>

<Cfheader name="Content-Disposition" value="filename=reports.xls">

<CFContent TYPE="application/vnd.ms-excel" RESET="Yes">

These are just instructions to the browser. It is likely that, somewhere else, your code is sending the user to the login page. Perhaps via the Application file.

In any case you have to say whether this is:

inline: <Cfheader name="Content-Disposition" value="inline; filename=reports.xls">

or

attachment: <Cfheader name="Content-Disposition" value="attachment; filename=reports.xls">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

I have no idea. I think it would be best to ask this question on the ColdFusion forum. ColdFusion

Thanks,

Preran

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Sorry.. I just thought that you being Adobe staff, you'd have access to ask the programmers how CF handles Excel objects during generation.

V/r,

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

I do, and thanks for calling that out. Am checking with the Engineering team members. Will get back as soon as I hear from them.

Thanks,

Preran

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Thanks, Preran.  Much appreciated.

Honestly, I've always been curious about some of the internal workings, just never asked.  This should be interesting.  I love learning new things.

V/r,

^ _ ^

PS:  Apologies to OP for hijacking the thread.  Was not my intention.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 01, 2018 Jun 01, 2018

Copy link to clipboard

Copied

The DW team tells me that this is more of a question for the CF folks. I will check with that team and get back to you.


Thanks,Preran

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 05, 2018 Jun 05, 2018

Copy link to clipboard

Copied

LATEST

The team confirmed that BKBK's answer is correct.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation