Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, April 30, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Reporting & Notification Forums - Reporting
Forum to discuss reports for SalesLogix including Crystal, SQL Reports, etc. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Reporting | New ThreadView:  Search:  
 Author  Thread: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?
Doug Evenhouse
Posts: 66
 
How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 May 09 5:30 PM
I have a report that I want to run for the currently logged in user with no prompting for parameters. I am trying to accomplish this using SalesLogix web client 7.5.1.

I tried adding the xml filter shown below in the XML Filter box of the Crystal Report Properties in Architect, but the report does not seem to even attempt to incorporate this filter in the report query based on what slx profiler tells me.




HISTORY
ALL

Query
<table>History</table>
USERID
=
:UserID


String






Ok - well, the forum is stripping out most of the xml. Basically I am adding the same xml that is generated for a condition if you click the Show XML button in the report edit conditions panel.

Is there a different/better approach that will work?

Thanks,
Doug
[Reply][Quote]
Charles De Guchteneere
Posts: 22
 
Re: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 May 09 8:22 AM
Very happy (not for you) that I am not the only guy with this problem!
It seems that there is a bug: the XML filter added via the architect is not taken into account in Web.
We contacted Sage France, but no answer... So please, guys, help us!

Charles
[Reply][Quote]
Charles De Guchteneere
Posts: 22
 
Re: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 May 09 4:04 AM
Have you already reported this bug to Sage UK or US?

Rgds
Charles
[Reply][Quote]
Doug Evenhouse
Posts: 66
 
Re: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 May 09 10:19 AM
Not yet. I will be working on this problem later this week (today is a US holiday) and will report back here with any additional information.

-Doug
[Reply][Quote]
Charles De Guchteneere
Posts: 22
 
Re: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 May 09 10:21 AM
I have seen that Sage is not very reactive on this issue, so your complain will be useful.
[Reply][Quote]
Charles De Guchteneere
Posts: 22
 
Re: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 May 09 9:34 AM
Seems to be a know problem in Web 7.5.1
Sage France advised me to modify the report by using the userid variable within the report SQL statements know by the SLX OleDB Provider.

Does anyone already did it?

Thanks
[Reply][Quote]
Doug Evenhouse
Posts: 66
 
Re: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 May 09 12:21 AM
A Sage rep has indicated to me that this appears to be a defect and they are looking into it.

I am intrigued by the advice to use the userid variable by asking the Slx Oledb Provider. This suggestion raises two questions for me: 1) how would one go about obtaining the currently-logged-in user from the Slx Oledb Provider and 2) how would one consult the Slx Oledb Provider within a Crystal Report? I may be misunderstanding the suggestion.
[Reply][Quote]
Charles De Guchteneere
Posts: 22
 
Re: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jun 09 6:49 AM
Sage feature request "1-58884"
[Reply][Quote]
Jose Urena
Posts: 92
 
Re: How to pass in the currently logged in userid to crystal report in saleslogix web 7.5.1?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Mar 10 7:25 AM
I have the solution, and it worked for SLX Web 7.2. It can be used to pass any, any value you want to the report, in a way some people could consider "ugly".

I will share this for people who want an easy way to implement the "User who printed the report" to satisfy a Customer Audit Policy.

Ok here is what i did:
1-Rename SLXWebReporting.aspx on C:\Program Files\SalesLogix\Web Components\slxwebrpt to SLXWebReporingV.aspx
2-Create a table on your SalesLogix installation called "ReporteMostrado" (it is in spanish because i'm latin) with 2 fields: REPORTE and USUARIO both VARCHAR2 let's say 200 size
3-Create a new SLXWebReporting.aspx (can be done in notepad) with the following:
<%@ Page Language="C#" AutoEventWireup="true" Trace="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">


protected void Page_PreRender(object sender, EventArgs e)
{
string rpt = Request["rpt"];
string User = Request["User"];
string Pwd = Request["Pwd"];
this.SqlDataSource1.DeleteCommand = "DELETE FROM REPORTEMOSTRADO WHERE REPORTE='" + rpt + "' AND USUARIO = (SELECT U.USERNAME FROM USERINFO U INNER JOIN USERSECURITY S ON U.USERID=S.USERID WHERE UPPER(S.USERCODE)='" + User + "')";
this.SqlDataSource1.Delete();
this.SqlDataSource1.InsertCommand= "INSERT INTO REPORTEMOSTRADO (REPORTE,USUARIO) VALUES ('" + rpt + "',(SELECT U.USERNAME FROM USERINFO U INNER JOIN USERSECURITY S ON U.USERID=S.USERID WHERE UPPER(S.USERCODE)='" + User + "'))";
this.SqlDataSource1.Insert();
Response.Redirect("SLXWebReportingV.aspx?rpt=" + rpt + "&User=" + User + "&Pwd=" + Pwd);
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Report Viewer</title>
</head>
<body>
<form id="form1" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=SALESLOGIX; Persist Security Info=True;User ID=sysdba; Password=masterkey;Unicode=True"
ProviderName="System.Data.OracleClient" SelectCommand="SELECT * FROM REPORTEMOSTRADO">
</asp:SqlDataSource>
</form>
</body>
</html>

As you can see the string connection is for an Oracle installation. You should edit this for your specific instalation because as you can see, i'm editing the database directly.

4-Create a new report (i recommend this) or edit one you have, and add an unlinked reference to the "ReporteMostrado" table. Remember to use the SLX OLE DB provider.
5-Drop the "USUARIO" field from the "ReporteMostrado" table to any place on your report.
6-Create a formula called ReporteMostrado and place the following in the formula:
"{" + Mid (Filename, InStr (1,Filename , "{")+1,InStr (1,Filename , "}")-InStr (1,Filename , "{")-1) + "}.rpt"
7-Add the following selection criteria to your report:
{REPORTEMOSTRADO.REPORTE} = {@ReporteMostrado}
8-Do a Log Off from Database Server Current Connection (on Database menu), and save your report
9-Don't try to test it because it wont work at this stage. Open Architect.exe and Add your new report
10-Do an IISRESET

Ok, now, open your portal, lets say "http://slxserver:3333/slxclient" with any user you want and go to reports.

Search for your report and launch it.

Can you see the name?
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 4/30/2024 1:50:23 AM