Skip to Content
0

how to pass parameter values from c# to crystal report located in CMC SAP

Jan 23, 2017 at 01:43 PM

18

avatar image
Former Member

string username = "admin";
string password = "admin123";
string cmc = "192.168.2.2:6400";
string serverUrl = "192.168.2.2:8080";
string auth_type = "Enterprise";

string token; string tokenEncoded;

int reportid = 16029;

SessionMgr session_mgr = new SessionMgr();
EnterpriseSession session = session_mgr.Logon(username, password, cmc, auth_type);

token = session.LogonTokenMgr.CreateLogonTokenEx("", 120, 100);
tokenEncoded = HttpUtility.UrlEncode(token,System.Text.Encoding.UTF8);

string url = string.Format("http://{0}/BOE/CrystalReports/viewrpt.cwr?id={1}≈stoken={2}&@GeneralTawheed_id={3}&@UserId={4}", serverUrl, reportid, tokenEncoded,"732", "112");

Response.Redirect(url);

I have the above lines of code but while loading report, it again asks for Parameter values. kindly tell me what to do ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers