|
-
September 25th, 2001, 06:54 AM
#1
Crystal Report
Hi..
I am using Crystal Report 8.5 for my reports. I am facing one problem...for designing the reports it requires the database to be selected.. which means we are hotcoding the database path.. Is it right or what step should i follow .if any suggestions and answers mail me..
Regards
Manikandan
-
September 28th, 2001, 06:16 AM
#2
Re: Crystal Report
hi
VB crystal report control by default search .exe directory, so copy all .rpt files in .exe directory, you can assign only reportfile name you don't need to specify any path itself.
if u had any problem mail me
[email protected]
Babu
MailID: [email protected]
Please avoid sending emails to my personal mail:
write your doubts as thread in Codeguru
Crystal Reports Forum.
This will help all people having similar matters, and will let people who know solutions on the specific topic
share their knowledge.
Visit my company web site (Qmax Test Equipments Private Limited)
Yours friendly,
K.Babu
-
September 28th, 2001, 12:13 PM
#3
Re: Crystal Report
If you are using Crystal OCX file, you can specify the database path and tables, etc.
If you are using Crystal Automation DLL, your best bet is to pass a recordset to it. Of course you will open the database and tables, etc. in VB.
-
November 2nd, 2001, 11:11 AM
#4
Re: Crystal Report
I use this function to change at runtime the server of the report.
My design server is like WJCG00000, the user server (for the runtime application) is like WJCG00101
long FCGetServer(char *String)
{
char *comodo = " ";
unsigned int i, len, j;
len = 0;
while (String[len] != '\0')
{
len++;
}
if (len-5 > 0)
{
j=0;
for (i = len-5; i <= len; i++)
{
comodo[j] = String[i];
j++;
}
// report with WJCG00000
if (strcmp(comodo,"00000") == 0)
{
return ((long) -1);
}
else
{
return atol(comodo);
}
}
else
{
return 0L;
}
}
//*******************************************************************************
BOOL FCSetServer(short job, const char *currname)
{
int numtable;
short currtable;
struct PELogOnInfo logOnInfo;
CString NewServerName,comodo;
comodo = currname;
NewServerName = "WJCG"+comodo;
numtable = PEGetNTables(job);
for (currtable=0; currtable < numtable; currtable++)
{
// Initialize size of structure
logOnInfo.StructSize = PE_SIZEOF_LOGON_INFO;
if (PEGetNthTableLogOnInfo(job, currtable, &logOnInfo) == FALSE)
{
return FALSE;
}
if (FCGetServer(logOnInfo.ServerName) != 0)
{
// is the server for the user lstrcpy(logOnInfo.ServerName, NewServerName.GetBuffer(10));
if (PESetNthTableLogOnInfo(job, currtable, &logOnInfo, FALSE) == FALSE)
{
return FALSE;
}
}
}
return TRUE;
}
/
From the application use:
if (FCSetServer(job,"00101") == FALSE)
{
// error
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|