Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

first time ignores filter... second works 1

Status
Not open for further replies.

DvDvDvDv

Programmer
May 24, 2001
100
PT
Hi all

I'm publishing a report directly to pdf.

I pass the parameters to the report and there is a filter on it based on those parameters. The first time access the report passing a parameter it igores it and makes a complete list without any filter. If I repeat the process (ie, access again using the same click) it work nicely.

What's the problem ???? maybe using a lot of parameters ???

Is there someone who can help me ?

Thanks in Advance

Dv
 
How many parms DO you have?

I know that there's a problem (or at least was) with the active-x viewer if the first parm was a type datetime.

When you say that you're publishing it directly to PDF and passing the parameters, does this mean that you are scheduling it, using an API, CSP, or???

-k kai@informeddatadecisions.com
 
Hi !

Thanks for responding.

Yes I'm using CSP page to export to pdf on the fly. On the past I had a problem using this method with a lot of parameters: at this time I lost my session variables and I needed to put less parameters. Now that is another report I was using on crystal ActiveX and I passed it to csp... I have 12 parameters... maybe that is the problem...

Dv
 
You might check if the parameters are being set using something like:

If ReportInterface.ReportParameters.Count > 0 Then
If ReportInterface.ReportParameters.Item(1).IsCurrentValueSet = TRUE Then
Response.Write "There are values currently chosen for this parameter."
Else
Response.Write "There are no values chosen for this parameter."
End If
Else
Response.Write "This report does not have any parameters."
End If

-k kai@informeddatadecisions.com
 
The problem is:

my csp page only defines the report on the link to access it, using the ID created on the Crystal Enterprise. This is the example:

<a HREF=&quot;<%response.write(Enterprise)%>id=<%response.write(NumReport)%>&apstoken=<%response.write(Token)%>&cmd=EXPORT&EXPORT_FMT=U2FPDF%3A0&promptex-Status=<%Response.Write(d1)%>&promptex-DataAtrasados=<%Response.Write(d12 & d13 & d14)%>&promptex-SelFase=<%Response.Write(d2)%>&promptex-QryFase=<%Response.Write(d3)%>&promptex-SelTroco=<%Response.Write(d4)%>&promptex-QryTroco=<%Response.Write(d5)%>&promptex-SelEsp=<%Response.Write(d6)%>&promptex-QryEsp=<%Response.Write(d7)%>&promptex-SelReuniao=<%Response.Write(d10)%>&promptex-QryReuniao=<%Response.Write(d11)%>&promptex-SelResp=<%Response.Write(d8)%>&promptex-QryResp=<%Response.Write(d9)%>&quot;>Clique aqui para visualizar o Relatório</a>

So how I define the report to use your code, allowing me to know if there are set parameters for the report ?

Dv
 
Sorry, I had thought that you were scheduling this.

This is from another thread here along these lines (CE 8):

AEldridge (Vendor) Jul 11, 2001
Here is some rough CSP that exports a report instance to a specified filepath as a PDF. This should give you some ideas on how to do this...

Cheers,
Alan

-------------------------------

(APS logon code snipped and you need the SI_ID of the instance - left as a exercise for the reader

' Get the RPT file
Set ceInfoObjects = ceInfoStore.Query(&quot;Select SI_NAME, SI_UISTATUS, SI_FILES From CI_INFOOBJECTS Where SI_ID=&quot; & Cstr(lInstanceID))

sFileSpec = &quot;c:\temp\myReport.rpt&quot;
ceInfoObjects.Item(1).Files.Item(1).CopyTo sFileSpec

' Export the RPT file to PDF
Set crApplication = CreateObject(&quot;CrystalRunTime.Application&quot;)
Set crReport = crApplication.OpenReport(sFileSpec)
crReport.DisplayProgressDialog = False
crReport.ExportOptions.DestinationType = 1 'Disk
crReport.ExportOptions.FormatType = 31 'PDF
crReport.ExportOptions.PDFExportAllPages = True
crReport.ExportOptions.DiskFileName = &quot;c:\temp\myReport.pdf&quot;
crReport.Export False 'Don't Prompt

' Free file handle and delete RPT file
Set crReport = Nothing
Set crApplication = Nothing
Set srFileSystem = WScript.CreateObject(&quot;Scripting.FileSystemObject&quot;)
srFileSystem.DeleteFile(sFileSpec)

Alan Eldridge
Melbourne, Australia kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top